zero-perfoliate
zero-perfoliate

Author Topic: help with php  (Read 1255 times)

Offline edgardo19

  • New PHP Members
  • Posts: 4
  • Karma: +0/-0
help with php
« on: July 09, 2008, 11:24:13 AM »
i need help with this php i upload to my website but the things they feel the infromation and try to send but its appears an error

icestormz

  • Guest
Re: help with php
« Reply #1 on: July 09, 2008, 12:21:37 PM »
Hi is this suppose to be a contact form which inserts into a mysql database if so you are missing the mysql code or is this just a form mail?

Offline edgardo19

  • New PHP Members
  • Posts: 4
  • Karma: +0/-0
Re: help with php
« Reply #2 on: July 09, 2008, 01:00:53 PM »
so can u help me  this is  a contact info that i make this two files one is the contact.html and the contact.php  u can check www.southgate2ward.org/contact.htm
« Last Edit: July 09, 2008, 01:09:09 PM by edgardo19 »

icestormz

  • Guest
Re: help with php
« Reply #3 on: July 09, 2008, 08:42:32 PM »
IF you are wondering what the problems where is a summery

- line 48 has and extra quotation mark
- line 6   beside the = sign you had a " mark and at the ending was and ' mark so that caused your error.

Here you go i have fixed the problem please try out the code and let me know the results. Remember this forum is here to help so do not hesitate to ask questions.

Code: [Select]
<?PHP

/*SUBJECT AND EMAIL VARIABLES - ESTES ES UN COMENTARIO*/

  $emailsubject ='CONTACT FORM From hulk website';
  $webmaster= 'edgardo@vapprinting.com';



$nameField = $_POST['name'];
$lastnameField = $_POST['lastname'];
$ageField = $_POST['age'];
$emailField = $_POST['email'];
$commentsField = $_POST['comments'];
 
$body = <<<EOD
<BR><HR><BR>
Name: $name <br>
Last Name: $lastname <br>
Age: $age <br>
Email: $email <br>
Comments: $comments <br>
EOD;

$headers = "from: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body,
$headers);

/*results rendered as HTML*/

$theResults = <<<EOD

<html>

<head>
<title>Gracias</title>
</head>

<body bgcolor="#000000" text="ffffff">
<br><br><br><br>
<h1>Thank you !!!</1
<hr>
De Click <a href="index.html">A Qui</> Para Regresar A La PAGINA PRINCINPAL

</body>
</html>
EOD;
echo "$theResults";

?>

Offline edgardo19

  • New PHP Members
  • Posts: 4
  • Karma: +0/-0
Re: help with php
« Reply #4 on: July 09, 2008, 09:37:59 PM »
i got the same problem in line 32
this error
Parse error: parse error, unexpected T_STRING in /home/content/e/d/g/edgardo1919/html/contact.php on line 32

icestormz

  • Guest
Re: help with php
« Reply #5 on: July 09, 2008, 10:40:14 PM »
give this a try and let me know if it workes

Code: [Select]
<?PHP

/*SUBJECT AND EMAIL VARIABLES - ESTES ES UN COMENTARIO*/

  $emailsubject ='CONTACT FORM From hulk website';
  $webmaster= 'edgardo@vapprinting.com';



$nameField = $_POST['name'];
$lastnameField = $_POST['lastname'];
$ageField = $_POST['age'];
$emailField = $_POST['email'];
$commentsField = $_POST['comments'];
 
$body = <<<EOD
<BR><HR><BR>
Name: $name <br>
Last Name: $lastname <br>
Age: $age <br>
Email: $email <br>
Comments: $comments <br>
EOD;

$headers = "from: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body,
$headers);

/*results rendered as HTML*/

$theResults = <<<EOD

<html>

<head>
<title>Gracias</title>
</head>

<body bgcolor="#000000" text="ffffff">
<br><br><br><br>
<h1>Thank you !!!</1
<hr>
De Click <a href="index.html">A Qui</> Para Regresar A La PAGINA PRINCINPAL

</body>
</html>
EOD;

echo $theResults

?>

icestormz

  • Guest
Re: help with php
« Reply #6 on: July 10, 2008, 08:44:59 PM »
Here is the solutions to the question you asked in PM, remember to place these files into the same directory.

 

zero-perfoliate