|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
How would I do this?
I want some user to type their name in in a box,
and when they press sumbit, their answer gets mailed to tree@world-net.co.nz as well as going to a page that says "Your name is [insert name they typed here] your messeged has been mailed (or something)" How would I go about making a script like that? thank you so much! |
|
#2
|
|||
|
|||
|
RE: How would I do this?
|
|
#3
|
|||
|
|||
|
RE: How would I do this?
something iz wrongz
" Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C " !>!?!?!?!?!? |
|
#4
|
|||
|
|||
|
RE: How would I do this?
The Location-header is supposed to have a complete URL (as per the PHP-manual). The corrected code would then be (in PHP4.1.2+):
Code:
<?php
if ($_POST['name'])
{
mail("tree@world-net.co.nz", "My Subject", "Name: " . $_POST['name']);
echo "Your name is " . $_POST['name'];
}
else
{
header('Location: http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']).'/name.htm');
}
?>
|
|
#5
|
|||
|
|||
|
RE: How would I do this?
btw, why isn't the [highlight=php] tag working?
|
|
#6
|
|||
|
|||
|
RE: How would I do this?
now its saying
"Warning: Failed to Connect in C !?!?!?!?!?!!!!!? |
|
#7
|
|||
|
|||
|
RE: How would I do this?
eeeeee nevermind it workz in a web server just not on my local server
thank you great php godz! |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > How would I do this? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|