Hey everyone,
The script to write in their name and ip adress now works. I'm trying to retrieve the data now.
It comes up with this error.PHP Code:<?php
mysql_connect("local_host", "****", "****") or die(mysql_error());
mysql_select_db("****") or die(mysql_error());
$result = mysql_query("SELECT * FROM example
WHERE ipadress='$_SERVER['REMOTE_ADDR'];'") or die(mysql_error());
$row = mysql_fetch_array( $result );
echo $row['name']." - ".$row['ipadress'];
?>
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home1/keyboard/public_html/databaseretrieve.php on line 8
Any help would be appreciated.



Reply With Quote
I've never tried two statements at once either. it does say "should not," though, not "must not." maybe it's the kind of thing that can cause problems in older php/sql versions or on particular server setups. who knows...

Bookmarks