works in test server but not in X10Hosting

Status
Not open for further replies.

os242

New Member
Messages
46
Reaction score
0
Points
0
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");
}
?>
 

Corey

I Break Things
Staff member
Messages
34,551
Reaction score
205
Points
63
Looks like something is wrong with your database connection.

Add or die(mysql_error()); after your queries.

-Coery
 
Status
Not open for further replies.
Top