| Author |
Topic Search Topic Options
|
gupta_ji
Groupie
Joined: 29 October 2003
Location: India
Status: Offline
Points: 70
|
Topic: PHP WEB FORM SCRIPT Posted: 07 July 2004 at 3:25pm |
I need a form script made in PHP. As I have made one of my site www.brigadeindia.com in PHP but the query form at http://www.brigadeindia.com/query.php is not working right now. Further, on http://www.brigadeindia.com/contactus.php I have used one flash file but it is not being shown. I donot know the reason why. Actually I am not good in PHP. I know only ASP. So, Please help.
Thanks
Edited by gupta_ji
|
|
|
 |
Mart
Senior Member
Joined: 30 November 2002
Status: Offline
Points: 2304
|
Posted: 07 July 2004 at 3:39pm |
|
You probably won't get much of a response on this forum as most people on this forum only know ASP/.NET
|
 |
zMaestro
Senior Member
Joined: 11 May 2003
Location: Egypt
Status: Offline
Points: 1183
|
Posted: 10 July 2004 at 1:27pm |
gupta_ji wrote:
Actually I am not good in PHP. I know only ASP. So, Please help.
|
what forces you to use PHP.. this forum is free btw 
anyway... here you are:
http://www.hotscripts.com/PHP/Scripts_and_Programs/Discussio n_Boards/index.html
|
 |
Mart
Senior Member
Joined: 30 November 2002
Status: Offline
Points: 2304
|
Posted: 10 July 2004 at 1:28pm |
|
He wants a form script not a forum script
|
 |
zMaestro
Senior Member
Joined: 11 May 2003
Location: Egypt
Status: Offline
Points: 1183
|
Posted: 12 July 2004 at 1:32pm |
Mart wrote:
He wants a form script not a forum script |
Ooops 
|
 |
zMaestro
Senior Member
Joined: 11 May 2003
Location: Egypt
Status: Offline
Points: 1183
|
Posted: 12 July 2004 at 1:46pm |
if form = contact form.. this may help 
<?php //if else statment to process the form //if sfeedback returns true if($email != "") { //if the email address is correct format if(eregi("([[:alnum:]\.\-]+)(\@[[:alnum:]\.\-]+\.+)", $email)) { //inserts header print $head; ?> <!-- Confirms the information you sent as feedback --> Thanks for your Rates Request Submission, <?php echo $name ?>. Here is what you submission:<br> Name: <?php echo $name ?><br> Email: <?php echo $email ?><br> Feedback: <?php echo $feedback ?><br> <?php //sets veriables for the email to webmaster $subject = "Feedback from your site"; // Change the following line to your email address $sendto = "Sales_Marketing@egyvision.com"; $header = "From: $email"; //mail() to send the info to webmaster mail($sendto, $subject, $feedback, $header); print "Thank you. Your comments have been sent to the Desert Rose - You will be recieving the Rates in Several Hours\n"; print "<p><p>"; //prints footer print $tail; //exits script so the form is not put up again exit(); //if address doesnt' look right error message } else { print"<center><font color=ff0000>!!The address $email doesn't look right, check it and try again!!</font></center>"; } } //if the above if else statement came back false the following would be printed //header echo $head;
// you may need to remove printing the header ?> <!--Change greeting if you like-->
|
<form action="<?php echo $PHP_SELF ?>" method="POST"> <tr><td><b>Name</td> <td> <input type="text" name="name" size="20" /></td></tr>
<tr><td><b>email</td> <td> <input type="text" name="email" size="20" /></td></tr>
<tr><td><b>feedback</td> <td> <input type="text" name="feedback" size="20" /></td></tr>
<tr><td><b> </td> <th><input type="submit" name="submit" value=" Send "> <input type="reset" name="reset" value=" Clear "></th></tr> </form>
|
Edited by zMaestro
|
 |
gupta_ji
Groupie
Joined: 29 October 2003
Location: India
Status: Offline
Points: 70
|
Posted: 13 July 2004 at 10:33am |
zMaestro wrote:
what forces you to use PHP.. this forum is free btw  |
Linux Forces me to use PHP.
Thanks for the code you gave me. If you can see my query form at www.brigadeindia.com/query.php you will find a lot of fields than single feedback field. The script you gave I also got from serveral links on the net. The problem I m getting is that there are more than one field, how should i get all the fields in this code. Hope this clears my point.
The other problem i m getting is that I am unable to see my flash file on my contact us page. Can we use flash file in PHP. if yes, what is the code. is that different from ASP code.
Thanks
|
|
|
 |
zMaestro
Senior Member
Joined: 11 May 2003
Location: Egypt
Status: Offline
Points: 1183
|
Posted: 16 July 2004 at 2:35am |
gupta_ji wrote:
zMaestro wrote:
what forces you to use PHP.. this forum is free btw  |
Linux Forces me to use PHP.
|
What forces you to host on Linux 
|
 |