Print Page | Close Window

PHP WEB FORM SCRIPT

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Web Design Discussion
Forum Description: Discussion on web design and development subjects.
URL: https://forums.webwiz.net/forum_posts.asp?TID=11123
Printed Date: 29 March 2026 at 2:57pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: PHP WEB FORM SCRIPT
Posted By: gupta_ji
Subject: PHP WEB FORM SCRIPT
Date Posted: 07 July 2004 at 3:25pm

I need a form script made in PHP. As I have made one of my site http://www.brigadeindia.com - www.brigadeindia.com in PHP but the query form at http://www.brigadeindia.com/query.php - http://www.brigadeindia.com/query.php  is not working right now. Further, on http://www.brigadeindia.com/contactus.php - 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



-------------
http://www.sgrj.com" rel="nofollow - chartered accountants India , http://www.delhiprofessionals.com" rel="nofollow - accounting Outsourcing ISO Certification



Replies:
Posted By: Mart
Date 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


Posted By: zMaestro
Date Posted: 10 July 2004 at 1:27pm
Originally posted by gupta_ji 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/Discussion_Boards/index.html - http://www.hotscripts.com/PHP/Scripts_and_Programs/Discussio n_Boards/index.html



Posted By: Mart
Date Posted: 10 July 2004 at 1:28pm
He wants a form script not a forum script


Posted By: zMaestro
Date Posted: 12 July 2004 at 1:32pm

Originally posted by Mart Mart wrote:

He wants a form script not a forum script

Ooops



Posted By: zMaestro
Date 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 = " mailto:Sales_Marketing@egyvision.com - 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>&nbsp;</td>
<th><input type="submit" name="submit" value=" Send ">          <input type="reset" name="reset" value=" Clear "></th></tr>
</form>



Posted By: gupta_ji
Date Posted: 13 July 2004 at 10:33am

Originally posted by zMaestro 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 http://www.brigadeindia.com/query.php - 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



-------------
http://www.sgrj.com" rel="nofollow - chartered accountants India , http://www.delhiprofessionals.com" rel="nofollow - accounting Outsourcing ISO Certification


Posted By: zMaestro
Date Posted: 16 July 2004 at 2:35am
Originally posted by gupta_ji gupta_ji wrote:

Originally posted by zMaestro 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



Posted By: zMaestro
Date Posted: 16 July 2004 at 2:40am

I know nothign about PHP, but I think if you read the code you can go on with. like:

If you want to add a field name: Address, just add it to the form

<Input type=text name=Address size=20>

then add this to the mail script in PHP, which sure will be:

mail($sendto, $subject, $feedback, $Address, $header);

I think this will get it work, add as many field as you want.

 



Posted By: Mart
Date Posted: 16 July 2004 at 2:51am

You have to fill variables though, its something like:

$Address = $_FORM["Address"];



Posted By: gupta_ji
Date Posted: 19 July 2004 at 9:51am

I got a Solution this is :

 

$message="Name of company : ".$company."\n"."Requirement : ".$description."\n"."email : ".$email."\n"."Contact Person : ".$name."\n"."Phone : ".$phone."\n"."Address : ".$address."\n"."Fax : ".$fax."\n"."City : ".$city."\n"."Country : ".$country."\n"."Zip : ".$pin;
mail( mailto:'info@brigadeindia.com','Query - 'info@brigadeindia.com','Query Through Net',$message,"From: $name <$email>");
header("location:thanks.php");

This will work.



-------------
http://www.sgrj.com" rel="nofollow - chartered accountants India , http://www.delhiprofessionals.com" rel="nofollow - accounting Outsourcing ISO Certification



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net