Results 1 to 4 of 4
mysql script wont' run "post" section
here is the script from demo on webblazonry
If I remove the if post then do I can force an update to the mysql ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-12-2003 #1Just Joined!
- Join Date
- Mar 2003
- Location
- USA
- Posts
- 18
mysql
mysql script wont' run "post" section
here is the script from demo on webblazonry
If I remove the if post then do I can force an update to the mysql database by giving the variables assignments (instead of using form)
but why will it not run if I try to use the form
any ideas?
thanks
slam
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<FONT SIZE=5> Add Link </FONT></P>
<?php
# this is processed when the form is submitted
# back on to this page (POST METHOD)
echo ("hpre"); echo("$REQUEST_METHOD");
if ($REQUEST_METHOD=="POST") {
echo ("hi");
# double-up apostrophes
$description = str_replace("'","''",$description);
$sitename = str_replace("'","''",$sitename);
# setup SQL statement
$SQL = " INSERT INTO links ";
$SQL = $SQL . " (category, sitename, siteurl, description) VALUES ";
$SQL = $SQL . " ('$category', '$sitename','$siteurl','$description') ";
#execute SQL statement
$result = mysql_db_query($db,"$SQL",$cid);
# check for error
if (!$result) { echo("ERROR: " . mysql_error() . "\n$SQL\n"); }
echo ("
New Link Added</P>\n");
}
?>
- 03-12-2003 #2Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
What's the output from the script when you post to it?
- 03-14-2003 #3Just Joined!
- Join Date
- Mar 2003
- Location
- USA
- Posts
- 18
form
it just shows the form again.
- 03-14-2003 #4Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
It must at least display "hpre" also, right?


Reply With Quote
