Creating a Form and Passing the Information Pt II
Below is the sample code you can use and modify to fit your needs. It contains all f the information you need before the advertiser goes to Pay Pal or any other method of payment you may have. I have eliminated the quotes from the code in order to display it.
<form method=post action=adboxes.php >
<h1>Publicidad para tu cajitas</h1>
<p>
<label>Nombre:</label>
<br/>
<input tabindex=1type=text name=nombre value= size=41 maxlength=75 />
</p>
<p>
<label>Correo:</label>
<br/>
<input tabindex=2 type=text name=email value= size=41 maxlength=75 />
</p>
<p>
<label>Nombre de Página Web:</label>
<br/>
<input tabindex=3 type=text name=url value= size=41 maxlength=75 />
</p>
<p>
<label>URL de Página Web:</label>
<br/>
<input tabindex=4 type=text name=url value= size=41 maxlength=75 />
</p>
<p>
<label>Descripcion:</label>
<br/>
<textarea tabindex=5 name=mensaje cols=41 rows=4></textarea>
</p>
<p>
<input type=hidden name=id value=<? echo $_GET[id] ?> size=1 maxlength=4 />
<input tabindex=6 type=submit class=button value=Enviar name=submit />
<input tabindex=7 type=reset class=button value=Borrar name=reset />
</p>
<p></p>
</form>
Here, is the adbox.php file you will need to create the email with the information provided and redirect the advertiser to PayPal or any other method of payment you may have. I have eliminated the double quotes from places you’ll see an *.
<?php
$email = 'your@email.com';
$emailfrom = $_POST['email'];
$from = *Mensaje de* . $_POST['nombre'];
$msg = $_POST['email'] . * - * . $_POST['url'] . *\n\nAdspace en caja #*. $_POST['id'] .* \n\n *. $_POST['mensaje'];
$msg = $msg .* \n\n\n *.* Message you want included in the email.*;
mail(*$email*, *$from*, *$msg*, *From: $emailfrom*);
$goto = *http://redirect.the.user.com*;
header(Location: *$goto*);
exit();
?>
I hope you find this helpful in creating your own. Cheers! ![]()
About this entry
You’re currently reading “Creating a Form and Passing the Information Pt II,” an entry on [//édúwín||réyés\\]
- Published:
- 01.16.08 / 12am
- Category:
- Blogs Dominicanos, Programing

2 Comments
Jump to comment form | comments rss [?] | trackback uri [?]