help...
I used to work with register globals On,.. now I'm working on a new project for my final essay for my study and at my work I found out the whole issue about the register_globals.
So at work I decided to code my script the right way, so like $_POST['var'] etc..
At work it works fine, I even try to code flawless with error_reporting(15).
But then,... I'm at home, I want to make some new scripts. Same PhpTriad install as at work. Same scripts as at work, register_globals Off like I have at work.
But it won't put my info in the database..! So I tried to figure out where I was mistaking, cuz I didn't get any errors or warnings..
Then I found out that the fault was here:
$number=$_POST['number'];
$week=$_POST['week'];
$time=$_POST['time'];
$title=$_POST['title'];
$country=$_POST['country'];
$q_home=$_POST['q_home'];
$q_draw=$_POST['q_draw'];
$q_away=$_POST['q_away'];
$sql="INSERT INTO match (toto_number, toto_week, toto_time, toto_title, toto_country, q_home, q_draw, q_away) VALUES('$number', '$week', '$time', '$title', '$country', '$q_home', '$q_draw', '$q_away')";
I always did it this way and it's the right way, it always worked and still works on my scripts which work for register_globals on...
Now my problem... I tried to look if the fault was in my database so I used Phpmyadmin to insert a new row into the table.
Then I got something like this:
INSERT INTO `match` (`match_id`, `toto_number`, `toto_week`, `toto_time`, `toto_title`, `toto_country`, `q_home`, `q_draw`, `q_away`) VALUES ('', '12', '23', '13.00', 'title', 'country', '1.45', '1.80', '2.10');
What I saw: ` instead of '
So I tried it out with the `and then my script works..
so what's you're problem you think?
well... why doesn't it work the way it should, with the normal apostrof???
Somebody PLEASE give me an explanation...
My system is the same as my work: Pentium 4 Windows XP
PHP Version 4.1.1, MySql Client API version
3.23.39, Server API CGI
Register_globals is Off, but I already tried it On. I tried all kind of quotes, only these weird ones work.. and it only happens to my register_global=Off kinda scripts...
I'm desperate, someone help me out🙁 🙁