Unstoppable Domains

PHP form question

Spaceship Spaceship
Watch

faisj

Established Member
Impact
70
I have made 2 php files script.php
and contact.htm

contact.htm
HTML:
                  <p>Get your tickets:<br> 
                  <FORM 
                              action="script.php"
                              method="post">
                     Naam: <INPUT name=name 
                              size=10 
                              style="BACKGROUND-COLOR: #FFFFFF; BORDER-BOTTOM: #F383A9 1px solid; BORDER-LEFT: #F383A9 1px solid; BORDER-RIGHT: #F383A9 1px solid; BORDER-TOP: #F383A9 1px solid; FONT-FAMILY: Arial; Helvetica; Microsoft Sans Serif; FONT-SIZE: 8pt; HEIGHT: 18px; WIDTH: 100px;" 
                              value= ><br>
                      Aantal kaarten: <INPUT name=amountoftickets 
                              size=10 
                              style="BACKGROUND-COLOR: #FFFFFF; BORDER-BOTTOM: #F383A9 1px solid; BORDER-LEFT: #F383A9 1px solid; BORDER-RIGHT: #F383A9 1px solid; BORDER-TOP: #F383A9 1px solid; FONT-FAMILY: Arial; Helvetica; Microsoft Sans Serif; FONT-SIZE: 8pt; HEIGHT: 18px; WIDTH: 20px;" 
                              value= > <br>
                      E-mail adres: <INPUT name=email 
                              size=10 
                              style="BACKGROUND-COLOR: #FFFFFF; BORDER-BOTTOM: #F383A9 1px solid; BORDER-LEFT: #F383A9 1px solid; BORDER-RIGHT: #F383A9 1px solid; BORDER-TOP: #F383A9 1px solid; FONT-FAMILY: Arial; Helvetica; Microsoft Sans Serif; FONT-SIZE: 8pt; HEIGHT: 18px; WIDTH: 100px;" 
                              value= ><br>
                      Mobiel nummer: <INPUT name=mobilenr
                              size=10 
                              style="BACKGROUND-COLOR: #FFFFFF; BORDER-BOTTOM: #F383A9 1px solid; BORDER-LEFT: #F383A9 1px solid; BORDER-RIGHT: #F383A9 1px solid; BORDER-TOP: #F383A9 1px solid; FONT-FAMILY: Arial; Helvetica; Microsoft Sans Serif; FONT-SIZE: 8pt; HEIGHT: 18px; WIDTH: 80px;" 
                              value= ><br>
<p align=right>
                      <a href="script.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('submit','','images/submit_over.gif',1)"><img src="images/submit_up.gif" name="submit" width="49" height="18" border="0" align="absmiddle"></a>



script.php
PHP:
<?
$mail = popen("/usr/sbin/sendmail -t THE EMAIL ADDRESSl","w");
fwrite($mail,"From: $email\n");
fwrite($mail,"To: THE EMAIL ADDRESS\n");
fwrite($mail,"Subject: EMAIL underground\n");

fwrite($name,"\n");
fwrite($amountoftickets,"\n");
fwrite($mobilenr,"\n");
fwrite($mail,"SUBSCRIBE underground\n");
pclose($mail);include("dank.html");
?>

Could someone help me... it aint working...

- Faisj
 
Last edited:
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
Change
Code:
fwrite($name,"\n");
fwrite($amountoftickets,"\n");
fwrite($mobilenr,"\n");
To
Code:
fwrite($mail, $name."\n");
fwrite($mail, $amountoftickets."\n");
fwrite($mail, $mobilenr."\n");
 
0
•••
I changed it but it still does not work...

I did not get any email.

I this piece of code correct? :
PHP:
$mail = popen("/usr/sbin/sendmail -t THE EMAIL ADDRESS","w");
fwrite($mail,"From: $email\n");
fwrite($mail,"To: THE EMAIL ADDRESSl\n");
fwrite($mail,"Subject: EMAIL underground\n");
 
Last edited:
0
•••
I've never sent an email like that before.

Check out mail().
 
0
•••
I dont understand it : (

I am not not good at all with php...

could you edit the script.php for me??? please...
(I am totally ready to pay some NP$'s)
 
0
•••
Change script.php to
PHP:
<?php

$message = "Name: $name\n
			Tickets: $amountoftickets\n
			Mobilenr: $mobilenr";
mail('-- YOUR EMAIL --', 'EMAIL underground', $message, 'From: '. $from . "\r\n");
include("dank.html");

?>
That should work, but it's not very secure.
 
Last edited:
0
•••
I got a email but only:

Name:

Tickets:

Mobilenr:

No information what i submitted has been send along.
Also the email: is not there..

the email should come from [email protected]
 
0
•••
PHP:
<?php

$email           = $_POST['email'];
$name            = $_POST['name'];
$amountoftickets = $_POST['amountoftickets'];
$mobilenr        = $_POST['mobilenr'];
$message         = "Email: $email\n
					Name: $name\n
					Tickets: $amountoftickets\n
					Mobilenr: $mobilenr";
					
mail('-- YOUR EMAIL --', 'EMAIL underground', $message, 'From: '. $from . "\r\n");
include("dank.html");

?>
 
Last edited:
0
•••
Again no info was send along:

I got:
Email:

Name:

Tickets:

Mobilenr:
 
0
•••
Ah.. I figured out the problem.. you have a link to script.php.. you aren't actually submitting the form.

Change contact.html to
Code:
<p>Get your tickets:<br>
<FORM action="script.php" method="post" name="form">
	Naam: 
	<INPUT name="name" size="10" style="BACKGROUND-COLOR: #FFFFFF; BORDER-BOTTOM: #F383A9 1px solid; BORDER-LEFT: #F383A9 1px solid; BORDER-RIGHT: #F383A9 1px solid; BORDER-TOP: #F383A9 1px solid; FONT-FAMILY: Arial; Helvetica; Microsoft Sans Serif; FONT-SIZE: 8pt; HEIGHT: 18px; WIDTH: 100px;" value="" /><br />
	Aantal kaarten: 
	<INPUT name="amountoftickets" size="10" style="BACKGROUND-COLOR: #FFFFFF; BORDER-BOTTOM: #F383A9 1px solid; BORDER-LEFT: #F383A9 1px solid; BORDER-RIGHT: #F383A9 1px solid; BORDER-TOP: #F383A9 1px solid; FONT-FAMILY: Arial; Helvetica; Microsoft Sans Serif; FONT-SIZE: 8pt; HEIGHT: 18px; WIDTH: 20px;" value="" /><br />
	E-mail adres: <INPUT name="email" size="10" style="BACKGROUND-COLOR: #FFFFFF; BORDER-BOTTOM: #F383A9 1px solid; BORDER-LEFT: #F383A9 1px solid; BORDER-RIGHT: #F383A9 1px solid; BORDER-TOP: #F383A9 1px solid; FONT-FAMILY: Arial; Helvetica; Microsoft Sans Serif; FONT-SIZE: 8pt; HEIGHT: 18px; WIDTH: 100px;" value="" /><br />
	Mobiel nummer: <INPUT name="mobilenr" size="10" style="BACKGROUND-COLOR: #FFFFFF; BORDER-BOTTOM: #F383A9 1px solid; BORDER-LEFT: #F383A9 1px solid; BORDER-RIGHT: #F383A9 1px solid; BORDER-TOP: #F383A9 1px solid; FONT-FAMILY: Arial; Helvetica; Microsoft Sans Serif; FONT-SIZE: 8pt; HEIGHT: 18px; WIDTH: 80px;" value="" /><br /> 
	<p align=right><a href="#" onclick="document.form.submit()" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('submit','','images/submit_over.gif',1)"><img src="images/submit_up.gif" name="submit" width="49" height="18" border="0" align="absmiddle"></a>
 
0
•••
Now i cant click on submit

is that because of the:

PHP:
<p align=right><a href="#" onclick="document.form.submit()" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('submit','','images/submit_over.gif',1)"><img src="images/submit_up.gif" name="submit" width="49" height="18" border="0" align="absmiddle"></a>

a href="#" ?

Ps. I have send you some NP$'s, THANKS FOR THE HELP
I hope we can get it working
 
0
•••
You should be able to click it.. the onclick=".." submit's the form, sending the information to script.php. Do you have these files uploaded somewhere?
 
1
•••
Dan said:
You should be able to click it.. the onclick=".." submit's the form, sending the information to script.php. Do you have these files uploaded somewhere?

I am sending you the url by pm
 
0
•••
Just a side note, you might want to take your email address out of the code you posted. Just as a precautionary measure.

-Steve
 
0
•••
done but i cant remove it from dan's quotes

THANKS DAN - script is working now!
 
0
•••
I think I removed your email from all of my posts. :)
 
0
•••
Appraise.net
Unstoppable Domains
Domain Recover
DomainEasy โ€” Live Options
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back