Jump to content

which server?


jaic

Recommended Posts

Hi All

 

Im having a dispute with my web hosting company as to which server a simple mail response form in php should be assigned to.

 

currently this one:

www.webxsite.co.uk.contact.php is working fine, ON WINDOWS SERVER

 

using the same php script on

www.oceansafe.co.uk/contact.php there is an Undifined Error

 

script used is:

 

<?php

if(isset($_POST['Submit'])) {

$name = $_POST['name'];

$tele = $_POST['tele'];

$email = $_POST['email'];

$required = $_POST['required'];

$comments = $_POST['comments'];

$mailing = $_POST['mailing'];

if($name == '' or $email == '' or $comments == '') {

$err = true;

$msg = 'Please complete all the required fields for us to be able to contact you.';

} else {

$mailmsg = 'OceanSafe WEBSITE MAIL:' . "\n\n";

$mailmsg.= 'Name: ' . $name . "\n";

$mailmsg.= 'Tele: ' . $tele . "\n";

$mailmsg.= 'Email: ' . $email . "\n";

$mailmsg.= 'Required: ' . $required . "\n";

if($mailing == 'true') {

$mailmsg.= 'Please add me to your mailing list to receive notice of offers from time to time';

}

if (eregi("\r",$email) || eregi("\n",$email)){

die ("spam!");

 

} else {

if(mail('info@oceansafe.co.uk','OceanSafe - Web Enquiry Form', $mailmsg, "From: noreply@oceansafe.co.uk")) {

header("Location: validate.htm");

}

}

}

}

?>

 

 

AND THEN FOR THE FORM LATER ON:

<form id="form2" method="post" action="contact.php">

  <div>

    <p align="center">

    <label for="name"><font face="Verdana" size="2">Full Name</font></label><font size="2" face="Verdana">:*<br>

</font><font face="Verdana" size="1">

    <input name="name" type="text" class="text" id="name" value="<?php echo $name; ?>" size="45" /><br>

</font><font face="Verdana"><label for="name">

    <font size="2">

    Daytime Contact Number:*<br>

</font></label></font><font face="Verdana" size="1">

    <input name="tele" type="text" class="text" id="tele" value="<?php echo $tele; ?>" size="45" /></font><font size="2" face="Verdana">

</font>

    <br>

</font><label for="email"><font size="2" face="Verdana">Your

Email Address:*<br>

</font></label><font face="Verdana" size="1">

<input name="email" type="text" class="text" id="email" value="<?php echo $email; ?>" size="45" /><br>

</font><label for="comments"><font face="Verdana" size="2">Work Required</font></label><font size="2" face="Verdana">:*<br>

</font><i><font face="Verdana" size="1">

<textarea name="required" cols="34" rows="2" class="text" id="required"><?php echo $required; ?></textarea><br>

</font></i><label for="mailing"><font face="Verdana" size="2">Add me to your mailing

list</font></label><font size="2" face="Verdana">

</font><font face="Veranda"><font size="1">

<input type="checkbox" name="mailing" value="true" id="mailing" /></font><font size="2"><br>

</font></font><i><font size="1" face="Veranda">

<input name="Submit" type="submit" class="btn" value="SEND" /></font></div>

</form>

 

Any Ideas??

 

Thanks

Link to comment
Share on other sites

Is there just one contact.php code? Your form is displaying <br /> tags in the form fields which leads me to believe you've got some errors in how your form code is put together causing those tags to 'bleed' into your value areas.

Link to comment
Share on other sites

do you mean if all the <font></font> areas etc are removed to the outside of the <form> then this would suffice, because even in its simplest form, just php, i was gettin the same problems, whether or not i extracted from another working site or wrote the whole thing again.

 

i don't know, it just seems to be a problem on this domain

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.