Jump to content

Recommended Posts

Posted

I'm delving back into php/sql again (first time since I abandoned Postnuke)

 

I swear this was working last night, but all of a sudden it's giving me this error:

 

>Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL Server Host 'www.reelidentities.org' (11) in /home/reelide/public_html/films/test.html on line 18

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/reelide/public_html/films/test.html on line 20

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/reelide/public_html/films/test.html on line 22
1
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/reelide/public_html/films/test.html on line 24

 

This is my code, with the exception of the username//password, which I've confirmed are correct on my server:

><?php
if ($submit) {

 // process form

$db = mysql_connect("reelidentities.org", "<username>", "<password>");

mysql_select_db("reelide_movabletype",$db);

 $sql = "INSERT INTO mt_filminfo (filminfo_director,filminfo_producer,filminfo_name,filminfo_address,filminfo_la,fi
minfo_dayphone,filminfo_evephone,filminfo_fax,filminfo_email,filminfo_web,filminfo_ru
ning,filminfo_orgformat,filminfo_complete) VALUES ('filminfo_director','filminfo_producer','filminfo_name','filminfo_address','filminfo_la','filminfo_dayphone',',filminfo_evephone','filminfo_fax','filminfo_email','filminfo_web','filminfo_running','filminfo_orgformat','filminfo_complete')";

 $result = mysql_query($sql);

 echo "Thank you! Information entered.\n";

} else{

$db = mysql_connect("reelidentities.org", "<username>", "<password>");

mysql_select_db("reelide_movabletype",$db);

$result = mysql_query("SELECT * FROM mt_filminfo WHERE filminfo_id = $record",$db);
echo $record;
if ($myrow = mysql_fetch_array($result)) {

?>

<input type="Hidden" name="<?php echo"$record"?>">
<a href="http://reelidentities.org/films/test.html?record=<?php echo $record + 1; ?>">Next Record</a>
<form method="post" action="<?php echo $PHP_SELF?>">
<h1>Film Information</h2>

<div class="formname">Film Title</div><input type="Text" name=""><br>
<div class="formfield"></div>
<div class="formname">Director</div>
<div class="formfield"><input type="Text" name="filminfo_director" value="<?php echo $myrow["filminfo_director"]; ?>" ></div>
<div class="formname">Producer</div><div class="formfield"><input type="Text" name="filminfo_producer" value="<?php echo $myrow["filminfo_producer"]; ?>"></div>

<h1>Entrant Information</h1>
<div class="formname">Current Status:</div>
<div class="formfield"></div>
<div class="formname">Name:</div>
<div class="formfield"><input type="Text" name="filminfo_name" value="<?php echo $myrow["filminfo_name"]; ?>"></div>
<div class="formname">Mailing Address:</div>
<div class="formfield"><input type="Text" name="filminfo_address" value="<?php echo $myrow["filminfo_address"]; ?>"></div>
<div class="formname">Louisiana Filmmaker?</div>
<div class="formfield"><input type="Text" name="filminfo_la" value="<?php echo $myrow["filminfo_la"]; ?>"></div>
<div class="formname">Daytime Phone?</div>
<div class="formfield"><input type="Text" name="filminfo_dayphone" value="<?php echo $myrow["filminfo_dayphone"]; ?>"></div>
<div class="formname">Evening Phone?</div>
<div class="formfield"><input type="Text" name="filminfo_evephone" value="<?php echo $myrow["filminfo_evephone"]; ?>"></div>
<div class="formname">Fax:</div>
<div class="formfield"><input type="Text" name="filminfo_fax" value="<?php echo $myrow["filminfo_fax"]; ?>"></div>
<div class="formname">E-Mail:</div>
<div class="formfield"><input type="Text" name="filminfo_email" value="<?php echo $myrow["filminfo_email"]; ?>"></div>
<div class="formname">Web Address</div>
<div class="formfield"><input type="Text" name="filminfo_web" value="<?php echo $myrow["filminfo_web"]; ?>"></div>
<div class="formname">Exact Running Time of Film:</div>
<div class="formfield"><input type="Text" name="filminfo_running" value="<?php echo $myrow["filminfo_running"]; ?>"></div>
<div class="formname">Original Format:</div>
<div class="formfield"><input type="Text" name="filminfo_orgformat" value="<?php echo $myrow["filminfo_orgformat"]; ?>"></div>
<div class="formname">Film Category</div>
<div class="formfield"></div>
<div class="formname">Date Completed:</div>
<div class="formfield"><input type="Text" name="filminfo_completed" value="<?php echo $myrow["filminfo_completed"]; ?>"></div>
<div class="formname">Synopsis:</div>
<div class="formfield"></div>
<input type="Submit" name="submit" value="Enter information">

</form>

<?php
}


} // end if
?>

 

The page is here: http://reelidentities.org/films/test.html?record=1

Posted

By clicking on that link i get the following error:

 

>Access denied for user: 'reelide_movable@216.180.243.122' (Using password: YES) in /home/reelide/public_html/films/test.html on line 18

 

The rest of the errors occur due to this one line.

 

Are you able to create a test database and get this user account to work on it ok?

 

Jim

Posted
I didnt try that.. but the entire site is being run off that that account... and off the same database.  no problems anywhere else.

 

Hmm.. It must be a missing ; or something.. but I can't see anything. The weird thing is is that it was working last night. I hope I didn't do something stupid before I saved it the last time. Uhg. So typically me. I was hoping a fresh set of eyes could spot something I'm missing. B) Thanks for taking a look at it!

Posted
Uhg.  So typically me.

Typically me indeed. When I copied it from my local machine to the server I didn't change "reelidentities.org" to localhost.

 

If it were a snake it would have bit me.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...