
Originally Posted by
GDVS
At the top of the page (right at the top of the PHP) put this...
$Name=$_POST['Name'];
$Password=$_POST['Password'];
$News1=$_POST['News1'];
$News2=$_POST['News2'];
$Weather=$_POST['Weather'];
Seriously, even if it's only for internal usage turn register_globals off. Never use it, forget you ever heard about it. Use $_POST or $_GET instead and assign as above.
its off. and im working towards fixing it, but... what exactly do i replace?
ive tried looking at another script ive pieced together which does the above, and got to:
PHP Code:
### Set DB Variables ###
$db_host = 'localhost' ;
$db_user = 'vini' ;
$db_pass = 'ddddddd' ;
### Get Form Info and Assign Variables ###
$frm_name = isset($_POST[name]) ? $_POST[name] : '' ;
$frm_password = isset($_POST[password]) ? $_POST[password] : '' ;
$frm_news1 = isset($_POST[news1]) ? $_POST[news1] : '' ;
$frm_news2 = isset($_POST[news2]) ? $_POST[news2] : '' ;
$frm_weather = isset($_POST[weather]) ? $_POST[weather] : '' ;
$frm_friday = isset($_POST[friday]) ? $_POST[friday] : '' ;
### Connect to DB ###
$db_connect = mysql_connect($db_host, $db_user, $db_pass) or die("Unable to connect to database") ;
### Select DB ###
$db_select = mysql_select_db('users') or die("unable to select database") ;
but im still lost, not sure where it would go in my existing 3 php files, and what i would edit/replace.