Jump to content

Help newbie


runsix89

Recommended Posts

I am trying to get a php script to work with my form so that the users form details are sent automatically to an email address, after the script has printed out the details the user has entered

 

This is the PHP script

/* Set up varaibles */

$Company = $_POST[Company_name];

$Contact = $_POST[Cont_pers];

$landline = $_POST[landline_No];

$Mob = $_POST[mobile];

$Fax_No = $_POST[Fax];

$Invaddr = $_POST[invoice];

$Del = $_POST[Delivery];

$descript = $_POST[[info]; This is the line that causes an error in the script dont get way?

print("This are the details that will be submitted in the body of an email<br><br>");

print("The Company name you entered is $Company<br>");

print("The landline number you entered is as follows $landline <br>");

print("The mobile number you entered is $mob <br>");

print("Fax number is $Fax_No");

print("You entered $Cont_pers for contact person <br>");

print("The delivery addres as $Del <br>");

print("Invoice address as $Invaddr <br>");

print("The additional details you entered are as follows $descript <br>");

 

This is the html form code from the html page

 

<form action="http://ccgi.abilityint.force9.co.uk/cgi-bin/PHP/form_handler.php" name="form" method="post" onSubmit="return check(this);">

<div id="formwrapper">

<div id="verytop">

<label for="Enquir">

<label for="Qout">

Quotation

<input type="radio" id="Qoutation" name="Qoutation" value="Q" tabindex="1">

</label>

Enquiry

<input type="radio" id="Enquiry" name="Enquiry" value="E" tabindex="2">

</label>

</div>

<div id="topleftsection" align="left">

    Company Name

    <br>

    <label for="Company_name">

    <input id="Company_name" name="Company_name" type="text" class="mainbodytext" maxlength="50" tabindex="3">

    </label>

    <br>

    Contact Name

    <label for="Contact_name">

    <input id="Contact_name" name="Contact_name" type="text" class="mainbodytext" maxlength="20" tabindex="4" >

    </label>

    <br>

    Invoice Address

<br>

<label for="Invoice">

<textarea name="Invoice" rows="4" cols="25" tabindex="11">

</textarea>

</label>

<div id="topmidsectionleft">

General email

    <br>

    <label for="general_email">

    <input id="general_email" name="general_email" type="text"  maxlength="20" tabindex="5">

    </label>

    <br>

    Your email

    <br>

    <label for="Specific_email">

    <input id="Specific_email" name="Specific_email" type="text" maxlength="20" tabindex="6">

    </label>

    </div>

    </div>

    <div id="topmidesectionright" align="left">

    Land line number

    <br>

    <label for="landline_No">

    <input id="landline_No" name="landline_No" type="text" maxlength="11" tabindex="7">

    </label>

    <br>

    Mobile Number

    <br>

    <label for="mobile">

    <input id="mobile" name="mobile" type="text" class="mainbodytext" maxlength="11" tabindex="8">

    </label>

    </div>

    <div id="toprightsection" align="left">

    Contact Person<br>

    <label for="Cont_pers">

    <input id="Cont_pers" name="Cont_pers" type="text" class="mainbodytext" maxlength="30" tabindex="8">

    </label>

    <br>

    Fax

    <br>

    <label for="fax">

    <input id="fax" name="fax" type="text" class="mainbodytext" maxlength="10" tabindex="9">

    </label>

    Delivery Address

<br>

<label for="Delivery">

<textarea name="Delivery" rows="4" cols="25" tabindex="13">

</textarea>

</label>

</div>

<br>

<div id="yesbutton">

    Is the Invoice address and delivery address the same?

<br>

<input type="button" value="Yes" tabindex="12" onClick="document.form.Delivery.value=myString" >

</div>

<div id="Middle" align="left">

Other information<br>

<label for="Info">

<textarea id="Info" name="Info" rows="8" cols="50" tabindex="14">

</textarea>

</label>

</div>

<div id="subutton">

<input type="button" value="Display form data" tabindex="16" onClick="Printformdata(Pass)">

<label for="submission">

<input type="submit" name="submission" id="submission" value="Submit the form" tabindex="15" >

</label>

</div>

</div>

</form>

 

The last line on the set variables of php script throws an error dont get way?, please help

Link to comment
https://forums.phpfreaks.com/topic/115998-help-newbie/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.