I have proces.php which will send the values into welcome.php.
Initially they are
And they increment under a certain condition so some of them will be 0 some 1.
I cannot retrieve them in welcome.php except the first one.
proces.php
___________
welcome.php
____________
The error message is:
Notice: Undefined index: fid in C:\xampp\htdocs \porto\welcome. php on line 6
Notice: Undefined index: r1 in C:\xampp\htdocs \porto\welcome. php on line 7
Notice: Undefined index: r2 in C:\xampp\htdocs \porto\welcome. php on line 8
............... ............... ..............
Score is 1; FORM_ID: ;
r1= ;r2= ;r3= ;r4= ;r5= ;r6= ;r7= ;r8= ;r9= ;
So only the score is seen(the first argument after the url). The rest are empty.
I tried with single quotes as seen on another site but didn't worked. I also tried to concatenate the values and the variable names first. I kept finding complicate examples for databases and passing through forms.
Thank you in advance!
_______________ _______________ __
If I send text it goes as so:
proces.php
welcome.php
Some text is now displayed. The URL is:
_______________ _______________ _____________
It works now. I just messed the order or my forms. I have 3 on the same page.
Initially they are
Code:
$r1=0; $r2=0; $r3=0;...
I cannot retrieve them in welcome.php except the first one.
proces.php
___________
Code:
header("Location:welcome.php?scor=$score&fid=$form_id&r1=$r1&r2=$r2&r3=
$r3&r4=$r4&r5=$r5&r6=$r6&r7=$r7&r8=$r8&r9=$r9");
welcome.php
____________
Code:
<?php $score = $_GET['score']; $form_id = $_GET['fid']; $r1 = $_GET['r1']; $r2 = $_GET['r2']; //................................ ?>
The error message is:
Notice: Undefined index: fid in C:\xampp\htdocs \porto\welcome. php on line 6
Notice: Undefined index: r1 in C:\xampp\htdocs \porto\welcome. php on line 7
Notice: Undefined index: r2 in C:\xampp\htdocs \porto\welcome. php on line 8
............... ............... ..............
Score is 1; FORM_ID: ;
r1= ;r2= ;r3= ;r4= ;r5= ;r6= ;r7= ;r8= ;r9= ;
So only the score is seen(the first argument after the url). The rest are empty.
I tried with single quotes as seen on another site but didn't worked. I also tried to concatenate the values and the variable names first. I kept finding complicate examples for databases and passing through forms.
Thank you in advance!
_______________ _______________ __
If I send text it goes as so:
proces.php
Code:
$string="some text";
header("Location:welcome.php?s=$string");
Code:
$str=$_GET['s']; echo $str;
Code:
http://localhost/porto/welcome.php?s=some%20text
It works now. I just messed the order or my forms. I have 3 on the same page.
Comment