php-punk if you are getting your information from a post form then your code is not register_globals=off compliant.
i am trying to get some variables passsed from a HTML from into PHP which then inputs to a DB.
so far it has not been working, so i posted on here and got told its not complient to 'registar_globals =off'
how would i make it complient
heres the code:
- Code: Select all
<?php
//connect to the DB
$Connect=mysql_connect(localhost,***,***) or die ("sorry unable to connect(1)");
//select DB
$DB=mysql_select_db(***) or die ("sorry unable to select DB");
// insert in to adamgb table: Fields, ID NAME DATE MAIL SITE POST , values in field order, ID - auto incremented NAME, date(auto) MAIL, SITE, POST
$query="INSERT INTO `adamgb` (`id`, `name`, `date`, `mail`, `site`, `post`) VALUES ('', '$name', '', '$mail', '$site', '$post'); ";
mysql_query($query) or die ("Sorry unable to connect(2)");
echo("Your Comments were Entered into the Straight To The Point GuestBook, thanx!!");
echo("<a><Href http://members.lycos.co.uk/stu3sk8r/adam/display.php>View GuestBook</a>")
?>


