NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page PHP form question

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 10-28-2006, 08:24 PM THREAD STARTER               #1 (permalink)
Senior Member
 
faisj's Avatar
Join Date: Mar 2005
Location: The Netherlands
Posts: 3,212
faisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to behold
 

Member of the Month
November 2006
Child Abuse Child Abuse Baby Health Cancer Survivorship Child Abuse

Question PHP form question


I have made 2 php files script.php
and contact.htm

contact.htm
HTML Code:
 <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>

????: NamePros.com http://www.namepros.com/programming/251998-php-form-question.html

script.php
PHP Code:
<?
$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");
????: NamePros.com http://www.namepros.com/showthread.php?t=251998
?>
Could someone help me... it aint working...

- Faisj
__________________

The PPC Parking Guide.com
~how much do you want to earn today?

Last edited by faisj; 10-28-2006 at 09:35 PM.
faisj is offline  
Old 10-28-2006, 08:37 PM   #2 (permalink)
Dan
Buy my domains.
 
Dan's Avatar
Join Date: Feb 2006
Posts: 2,796
Dan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant future
 


Autism Autism Autism Autism Autism Autism Autism
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");
Dan is offline  
Old 10-28-2006, 08:43 PM THREAD STARTER               #3 (permalink)
Senior Member
 
faisj's Avatar
Join Date: Mar 2005
Location: The Netherlands
Posts: 3,212
faisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to behold
 

Member of the Month
November 2006
Child Abuse Child Abuse Baby Health Cancer Survivorship Child Abuse
I changed it but it still does not work...

I did not get any email.

I this piece of code correct? :
PHP Code:
$mail popen("/usr/sbin/sendmail -t THE EMAIL ADDRESS","w");
????: NamePros.com http://www.namepros.com/showthread.php?t=251998
fwrite($mail,"From: $email\n");
fwrite($mail,"To: THE EMAIL ADDRESSl\n");
fwrite($mail,"Subject: EMAIL underground\n"); 
__________________

The PPC Parking Guide.com
~how much do you want to earn today?

Last edited by faisj; 10-28-2006 at 09:35 PM.
faisj is offline  
Old 10-28-2006, 08:45 PM   #4 (permalink)
Dan
Buy my domains.
 
Dan's Avatar
Join Date: Feb 2006
Posts: 2,796
Dan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant future
 


Autism Autism Autism Autism Autism Autism Autism
I've never sent an email like that before.

Check out mail().
Dan is offline  
Old 10-28-2006, 08:49 PM THREAD STARTER               #5 (permalink)
Senior Member
 
faisj's Avatar
Join Date: Mar 2005
Location: The Netherlands
Posts: 3,212
faisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to behold
 

Member of the Month
November 2006
Child Abuse Child Abuse Baby Health Cancer Survivorship Child Abuse
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)
__________________

The PPC Parking Guide.com
~how much do you want to earn today?

faisj is offline  
Old 10-28-2006, 08:52 PM   #6 (permalink)
Dan
Buy my domains.
 
Dan's Avatar
Join Date: Feb 2006
Posts: 2,796
Dan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant future
 


Autism Autism Autism Autism Autism Autism Autism
Change script.php to
PHP Code:
<?php
????: NamePros.com http://www.namepros.com/showthread.php?t=251998

$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 by Dan; 10-28-2006 at 10:39 PM.
Dan is offline  
Old 10-28-2006, 08:56 PM THREAD STARTER               #7 (permalink)
Senior Member
 
faisj's Avatar
Join Date: Mar 2005
Location: The Netherlands
Posts: 3,212
faisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to behold
 

Member of the Month
November 2006
Child Abuse Child Abuse Baby Health Cancer Survivorship Child Abuse
I got a email but only:

Quote:
Name:
????: NamePros.com http://www.namepros.com/showthread.php?t=251998

Tickets:

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

the email should come from info@theundergroundparty.nl
__________________

The PPC Parking Guide.com
~how much do you want to earn today?

faisj is offline  
Old 10-28-2006, 08:59 PM   #8 (permalink)
Dan
Buy my domains.
 
Dan's Avatar
Join Date: Feb 2006
Posts: 2,796
Dan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant future
 


Autism Autism Autism Autism Autism Autism Autism
PHP Code:
<?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";
????: NamePros.com http://www.namepros.com/showthread.php?t=251998
                    
mail('-- YOUR EMAIL --''EMAIL underground'$message'From: '$from "\r\n");
include(
"dank.html");

?>
Last edited by Dan; 10-28-2006 at 10:39 PM.
Dan is offline  
Old 10-28-2006, 09:02 PM THREAD STARTER               #9 (permalink)
Senior Member
 
faisj's Avatar
Join Date: Mar 2005
Location: The Netherlands
Posts: 3,212
faisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to behold
 

Member of the Month
November 2006
Child Abuse Child Abuse Baby Health Cancer Survivorship Child Abuse
Again no info was send along:

I got:
Quote:

Email:

Name:

Tickets:

Mobilenr:
__________________

The PPC Parking Guide.com
~how much do you want to earn today?

faisj is offline  
Old 10-28-2006, 09:09 PM   #10 (permalink)
Dan
Buy my domains.
 
Dan's Avatar
Join Date: Feb 2006
Posts: 2,796
Dan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant future
 


Autism Autism Autism Autism Autism Autism Autism
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>
Dan is offline  
Old 10-28-2006, 09:14 PM THREAD STARTER               #11 (permalink)
Senior Member
 
faisj's Avatar
Join Date: Mar 2005
Location: The Netherlands
Posts: 3,212
faisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to behold
 

Member of the Month
November 2006
Child Abuse Child Abuse Baby Health Cancer Survivorship Child Abuse
Now i cant click on submit

is that because of the:

PHP Code:
<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
????: NamePros.com http://www.namepros.com/showthread.php?t=251998
a href="#" ?

Ps. I have send you some NP$'s, THANKS FOR THE HELP
I hope we can get it working
__________________

The PPC Parking Guide.com
~how much do you want to earn today?

faisj is offline  
Old 10-28-2006, 09:16 PM   #12 (permalink)
Dan
Buy my domains.
 
Dan's Avatar
Join Date: Feb 2006
Posts: 2,796
Dan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant future
 


Autism Autism Autism Autism Autism Autism Autism
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?
Dan is offline  
Old 10-28-2006, 09:18 PM THREAD STARTER               #13 (permalink)
Senior Member
 
faisj's Avatar
Join Date: Mar 2005
Location: The Netherlands
Posts: 3,212
faisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to behold
 

Member of the Month
November 2006
Child Abuse Child Abuse Baby Health Cancer Survivorship Child Abuse
Originally Posted by Dan
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
__________________

The PPC Parking Guide.com
~how much do you want to earn today?

faisj is offline  
Old 10-28-2006, 09:33 PM   #14 (permalink)
A Wealth of Knowledge
 
stscac's Avatar
Join Date: Aug 2004
Posts: 3,809
stscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud of
 



Just a side note, you might want to take your email address out of the code you posted. Just as a precautionary measure.

-Steve
stscac is offline  
Old 10-28-2006, 09:36 PM THREAD STARTER               #15 (permalink)
Senior Member
 
faisj's Avatar
Join Date: Mar 2005
Location: The Netherlands
Posts: 3,212
faisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to beholdfaisj is a splendid one to behold
 

Member of the Month
November 2006
Child Abuse Child Abuse Baby Health Cancer Survivorship Child Abuse
done but i cant remove it from dan's quotes

THANKS DAN - script is working now!
__________________

The PPC Parking Guide.com
~how much do you want to earn today?

faisj is offline  
Old 10-28-2006, 10:39 PM   #16 (permalink)
Dan
Buy my domains.
 
Dan's Avatar
Join Date: Feb 2006
Posts: 2,796
Dan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant future
 


Autism Autism Autism Autism Autism Autism Autism
I think I removed your email from all of my posts.
Dan is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 05:17 PM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger