im going insane, this always worked before, why wont it work now?!
one file:
<html>
<form action="tagit.php" method="get">
<input type="text" name="shout"><br>
<input type="submit">
</html>
another file:
<html>
<?
$username = "morrowasted";
$password = "*****";
$database= "www";
$server = "localhost";
$query = "INSERT INTO shoutz VALUES($shout);"
$result = mysql_connect ($server, $username, $password);
mysql_select_db ("www", $result);
mysql_query ($query, $result);
mysql_close($result);
?>
</html>
but i get
Parse error: parse error in c:\phpdev\www\public\tagit.php on line 8
ahhhh whats the problem??? i can connect to the DB using this script:
<html>
<?
$mysql_server = "localhost";
$mysql_user = "morrowasted";
$mysql_password = "*****";
$result = mysql_connect ($mysql_server, $mysql_user, $mysql_password);
mysql_select_db ("www");
if ($result) {
echo "cool";
}else{
echo"wow";
}
?>
</html>
whats the deal???$query = "INSERT INTO shoutz VALUES($shout);"
doesn't have an ending ; after the "
$query = "INSERT INTO shoutz VALUES($shout)";
should workthanks, no errors anymore, but my table is still returning an empty set.
whats wrong?do you have globals off?
if so then you need this
$query = "INSERT INTO shoutz VALUES('{$_GET['shout']}');"ah, thanks a million scoutt!Originally posted by scoutt
do you have globals off?
that'll get you everytime!!! well, i actually remembered that, but i thought that it was On. hm, oh well
one file:
<html>
<form action="tagit.php" method="get">
<input type="text" name="shout"><br>
<input type="submit">
</html>
another file:
<html>
<?
$username = "morrowasted";
$password = "*****";
$database= "www";
$server = "localhost";
$query = "INSERT INTO shoutz VALUES($shout);"
$result = mysql_connect ($server, $username, $password);
mysql_select_db ("www", $result);
mysql_query ($query, $result);
mysql_close($result);
?>
</html>
but i get
Parse error: parse error in c:\phpdev\www\public\tagit.php on line 8
ahhhh whats the problem??? i can connect to the DB using this script:
<html>
<?
$mysql_server = "localhost";
$mysql_user = "morrowasted";
$mysql_password = "*****";
$result = mysql_connect ($mysql_server, $mysql_user, $mysql_password);
mysql_select_db ("www");
if ($result) {
echo "cool";
}else{
echo"wow";
}
?>
</html>
whats the deal???$query = "INSERT INTO shoutz VALUES($shout);"
doesn't have an ending ; after the "
$query = "INSERT INTO shoutz VALUES($shout)";
should workthanks, no errors anymore, but my table is still returning an empty set.
whats wrong?do you have globals off?
if so then you need this
$query = "INSERT INTO shoutz VALUES('{$_GET['shout']}');"ah, thanks a million scoutt!Originally posted by scoutt
do you have globals off?
that'll get you everytime!!! well, i actually remembered that, but i thought that it was On. hm, oh well