Hi there:
I am having troubles for getting my site run in X10Hosting server, the script works in the testing server in my PC but not when it is exported to X10Hosting server.
I am receiving the next message:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/os242/public_html/Project_pass_check.php on line 11
Warning: Cannot modify header information - headers already sent by (output started at /home/os242/public_html/Project_pass_check.php:11) in /home/os242/public_html/Project_pass_check.php on line 31
in the following script (Any suggestions?????):
<?php
# GRAB THE VARIABLES FROM THE URL
$PNAME=$_POST['PNAME'];
$PPASS=$_POST['PPASS'];
setcookie("PNAME",$PNAME);
include('Connections/Conex.php');
$result=mysql_query("select count(*) from projects where PNAME='$PNAME' AND PPASS='$PPASS'");
$row = mysql_fetch_row($result);
$count=$row[0];
if ($count >0)
{
$con = mysql_connect("localhost","os242_os242","pansa/22");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("aipdc", $con);
$result2 = mysql_query("SELECT PID FROM projects where PNAME='$PNAME' AND PPASS='$PPASS'");
while($row2 = mysql_fetch_array($result2))
{
$a=$row2['PID'];
setcookie("PID",$a);
header ("Location: User_Reg_A2.php");
}}
else
{
header ("Location: Login_Failed_User_Reg.htm");
}
?>
I am having troubles for getting my site run in X10Hosting server, the script works in the testing server in my PC but not when it is exported to X10Hosting server.
I am receiving the next message:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/os242/public_html/Project_pass_check.php on line 11
Warning: Cannot modify header information - headers already sent by (output started at /home/os242/public_html/Project_pass_check.php:11) in /home/os242/public_html/Project_pass_check.php on line 31
in the following script (Any suggestions?????):
<?php
# GRAB THE VARIABLES FROM THE URL
$PNAME=$_POST['PNAME'];
$PPASS=$_POST['PPASS'];
setcookie("PNAME",$PNAME);
include('Connections/Conex.php');
$result=mysql_query("select count(*) from projects where PNAME='$PNAME' AND PPASS='$PPASS'");
$row = mysql_fetch_row($result);
$count=$row[0];
if ($count >0)
{
$con = mysql_connect("localhost","os242_os242","pansa/22");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("aipdc", $con);
$result2 = mysql_query("SELECT PID FROM projects where PNAME='$PNAME' AND PPASS='$PPASS'");
while($row2 = mysql_fetch_array($result2))
{
$a=$row2['PID'];
setcookie("PID",$a);
header ("Location: User_Reg_A2.php");
}}
else
{
header ("Location: Login_Failed_User_Reg.htm");
}
?>