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('[email protected]','OceanSafe - Web Enquiry Form', $mailmsg, "From: [email protected]")) {

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
https://forums.phpfreaks.com/topic/54799-which-server/
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
https://forums.phpfreaks.com/topic/54799-which-server/#findComment-271008
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.