But this adds 22,d_fname, test_lname, test_team into the database but i have something like
$name=“thisisname” ;
in PHP which i want to insert and till now i have tried various options but no use.
Ex - i used
$sql = ‘INSERT INTO tech_zivers.Driver_inf (dr_id, first_name, last_name, team) VALUES (‘22’, $name\ , ‘test_lname’, ‘test_team’);’;
etc.
You are escaping the dollar sign, which the parser needs in order to know that it’s a variable. Also, if 22 is a number, there is no need to put it into quotes. Besides pass it null and it should auto-increment if you have set up your table correctly.
I have 2 different strange scences here . Will put it in 2 posts and both are quite illogical to me)
Earlier i didn’t mention that i am using $_POST[‘t1’] to get the value of textfield1
from Flash.Because nowhere i thought that cld be a problem.
If i write $d_id=883 before this POST thing then it doesn’t work in SQl but if i write after it then it works.(with double quotes only)
Now the next thing is that may be Flash is sending something wrong but this is also not the case because i am taking this value back into Flash
$d_fname = $_POST[‘t1’] ;
echo “&theText=$dfname”;
and displaying this field into some other textfield2. And textfield2 is displaying same values as textfield1. So still i thing there is something in PHP only.
Scene 2:
As i mentioned that $d_id didn’t work if i put before POST but if i use anything else like $name or $heoo then it works both before and after. lol
I don’t know if it has anything to do with “d”.
So that would have solved my problem if i use $name but no this doesn’t end here:
i want to send POST[‘t1’] value in SQL and when i include it
$name = $_POST[‘t1’];
then it doesn’t go in my SQl even in VARCHAR field. I just don’t know whats wrong. Now i am moving with hitntrial…