View Full Version : New to webites and stupid

03-09-2006, 08:30 PM
:) Hey guys i'm amking my own website, i'm pretty good at html but everything else i'mm an idiot, and stupid at and would appreciate your help. Is there a script that i can make a pop up box that people enter tehir e-mail and name to and it will send it to me. I need a code like my friend have on his site http://www.4evertoned.com/. I would appreciate it a great deal

03-09-2006, 08:48 PM
This needs to be done server-side. Not a task for a newbie. Read through the documentation on http://www.php.net/.

03-10-2006, 09:03 AM
I would recomend this website: http://www.thesitewizard.com/wizards/feedbackform.shtml

It should get you started.. If u dont have php or perl, u can use a remote host.. have a look..

03-13-2006, 09:32 PM
The popup is javascript. Google that. Easy.

The form is php.

It's really not that hard. Yeah... php.net and look for stuff.

Basically, set the form's action to either the same page or another, and in that page, put a php script that handles the data input. I'd say, for your use, put it in a new page.
<form action="nextpage.php" method="post">
Now... you've got your form setup. Put that in a popup with correctly named fields for comment, email, whatever.
Now... in nextpage.php (or yournamehere.php), do something like this:

$varname = $_POST['varname']; /*gets the variables that were sent from the
form. see 'method="post"' above. The other one is "get"/$_GET[''], but that
adds them to your url as well, so this way its hidden and cleaner.*/
[repeat above line for each variable.] //repeat above...

INSERT add to database code OR mail() function code
/*I'd recommend the mail function... have it mail to your email (maybe setup
a free new account) and then just use html to add to your page. You could
use a database and it would be easier, but then you'd have to have a db and
know how to put the data in and get the data out. Tutorials will help with
either of these. You could even do something with a text file instead of a
database or something... but... I'd recommend the other two options. (Maybe
you could even code it to add directly to your page... that's kinda risky
though... at least the email way lets you verify...)*/

if ([CHECK IF IT WORKED HERE-- see tutorial for method you choose above]) { //optional
echo "[insert html (javascript) for the closepopup command]"; /*prints html
that will close the window.*/
} //optional, see above

Hope this helps.