![]() |
|
? |
![]() PHP FAQ PHP Articles PHP Help Bulletin Board PHP Manual (NEW!) First Time PHP'ers Help with programming Sql assignment help PHP Homework Help C# Help
|
? |
|
|||||||||||||||||||||||||||||||||
?Reply To This Message | ||||||||||||||||||||||||||||||||||||
?Your Name: | ||||||||||||||||||||||||||||||||||||
?Your Email: | ||||||||||||||||||||||||||||||||||||
?Subject: | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
Email replies to this thread, to the address above. | ||||||||||||||||||||||||||||||||||||
??wrote: > > I need a little help writing my first php script. > > My problem right now is passing information from one php file > to an other... > > I have 2 files, the fisrt (create_entry_form.php) contains > this: > > Note: I want to pass the info collected in this form to a > file called create_entry.php > I have written this line to do so (but it does not seem to > work) > Add entries to address book>> No. de tel de maison: > > > No. de tel cellulaire: > > > No. de tel de travail: > > > Addresse: > > > Ville: > > > Code Postal: > > > E-mail: > > > URL: > > > > > > > Submit before if -> $submit <- "); > > > while (list($name, $value) = each($HTTP_POST_VARS)) { > > echo "$name = $value \n"; > > } > > print ("$HTTP_POST_VARS "); > > if ( $submit == "Add" ) { > $query = "insert into entries > (name,phone_num,cell_num,work_num,address,city,postal_code,email,url) values > ('$name','$phone_num','$cell_num','$work_num','$address','$city','$postal_code','$email','$url')" > ; > mysql_query($query) or > die (mysql_error()); > ?> > > The entry has been added!>View My Address Book!!!> > } else { > > include("create_entry_form.php"); > print "Submit after if -> $submit <- "; > } > > ?> > > > > > > ---file end--- > > > What am I doing wrong?? Why does the variable $submit not > contain "Add" when passed from create_entry_form.php to > create_entry.php? > > I'm obviously doing something wrong but can't figure it out... > > My web server is Apache version 1.3.26-win32-x86 > I have MySQL server running, version 3.23.53 > MyODBC version 3.51.06 > my OS is WinXP > and I'm using PHP 4.04 (I think...) > > Any help would be greatly appreciated, you can reach me at > [email protected] > > Thanks in advance.. Yves ">?? ![]() |