Computing.Net > Forums > Programming > Form passing in php on winxp

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Form passing in php on winxp

Reply to Message Icon

Name: pogo
Date: July 8, 2003 at 16:56:41 Pacific
OS: Windows XP Home
CPU/Ram: P4 2.4ghz, 512mb ram
Comment:

I´m writing a script on php on win xp, with apache web server, the server it`s working ok, and php too, the problem is when I try to pass a form to another script; I´m not able to use the varible on the script i send the form to. I´ve been programming php on linux and I`m writing the exact same code. Thank`s for anyone that could help me



Sponsored Link
Ads by Google

Response Number 1
Name: Infinite Recursion
Date: July 8, 2003 at 17:39:30 Pacific
Reply:

Hey pogo:

I do not consider myself a PHP expert, but I am running a similar setup that you have. (PHP4 with Apache). I came across a feedback script that had a form in html, as shown below... and passing it and the values to a PHP script... also shown below. Maybe this will help you.

------

Email:
Message:


------

The sendmail.php script follows:


----

Hope this helps.

Infinite Recursion


0

Response Number 2
Name: Infinite Recursion
Date: July 8, 2003 at 17:41:28 Pacific
Reply:

Ok... that sucks. The code was not included in here... is there a way around this?

feedback.html file:


Email:
Message:


sendmail.php:



0

Response Number 3
Name: Infinite Recursion
Date: July 8, 2003 at 17:44:24 Pacific
Reply:

I'm going to try this one more time... Someone please tell me how to post code on this forum without it going blank on me.

Index file:

Email:
Message:


--

If this code doesn't show up, go to http://www.daholygoat.com/phptutorial.html for a nice tutorial on it.

Infinite Recursion


0

Response Number 4
Name: Infinite Recursion
Date: July 8, 2003 at 18:18:24 Pacific
Reply:

Hey pogo:
I do not consider myself a PHP expert, but
I am running a similar setup that you have.
(PHP4 with Apache). I came across a feedback
script that had a form in html, as shown
below... and passing it and the values to a
PHP script... also shown below.
Maybe this will help you.

------

The feedback.html file:


Email:
Message:



------

The sendmail.php script:

----

Hope this helps.

Infinite Recursion


0

Response Number 5
Name: Infinite Recursion
Date: July 8, 2003 at 18:21:21 Pacific
Reply:

I've embarrased myself enough with trying to paste code here. lol. That coder utility must not work for PHP. At any rate...

If your HTML form's action was to go to your PHP script, you can access variables like this...

$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;

where 'email' and 'message' are the component names of your form.

I wish I code have posted code on this, but it seems to be a lost cause at this point, I have humiliated myself enough for tonight. :)

Infinite Recursion


0

Related Posts

See More



Response Number 6
Name: Infinite Recursion
Date: July 8, 2003 at 19:15:43 Pacific
Reply:


Here's the code I was talking about Pogo. Thanks for the procedure to list code Micah.

------

The feedback.html file:

< form method="post" action="sendmail.php">
Email:
Message:



------

The sendmail.php script:


< ?php
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;

mail( "me@me.com", "Feedback Form Results", $message, "From: $email" );
header( "Location: http://www.example.com/thankyou.html" );
?>

----

Hope this helps.

Infinite Recursion


0

Response Number 7
Name: Infinite Recursion
Date: July 8, 2003 at 19:16:56 Pacific
Reply:

code close enough to get the idea...
just have your components in your form labeled and reference them in your php script. everything should work out.

Infinite Recursion


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Form passing in php on winxp

problem with date() function in PHP www.computing.net/answers/programming/problem-with-date-function-in-php/8855.html

Form posting with PHP www.computing.net/answers/programming/form-posting-with-php/12263.html

can't set cookie in php www.computing.net/answers/programming/cant-set-cookie-in-php/10659.html