tim_ver
Members-
Posts
40 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
tim_ver's Achievements
Member (2/5)
0
Reputation
-
Parse error: syntax error, unexpected T_STRING on line 29
tim_ver replied to tim_ver's topic in PHP Coding Help
Arghh, ok. This looks to be different then what I am after though. Anyone know how to fix the issue with the code I am using? Or am I out of luck? Thanks -
Parse error: syntax error, unexpected T_STRING on line 29
tim_ver replied to tim_ver's topic in PHP Coding Help
Ok so what am I missing? Thanks -
Parse error: syntax error, unexpected T_STRING on line 29
tim_ver replied to tim_ver's topic in PHP Coding Help
Ahh ok here is the send.php code: <?php if($_GET['ID']!=''){ session_start(); require('include/kaip.php'); check_install(); c_mysql_connect(); $result = c_mysql_query('SELECT * FROM listings WHERE listing_approved = 1 AND listing_id = %P LIMIT 1', array($_GET['ID'])); if(mysql_num_rows($result) != 0) { $row = mysql_fetch_assoc($result); } }else{ $row['listing_contact'] = "info@mydomain.com"; $row['listing_title'] = "Contact"; } include("class.phpmailer.php"); $mail = new PHPMailer(); $mail->From = $_POST['Contact_Name']; $autotype; if($autotype == 1) { $header = "From: mydomain.com \r\n"; $email = "info@mydomain.com"; mail($email, "Subject", "Thank you for your request We will be in touch in 24 hours", $header); } if($_GET['ID']!=''){ $mail->FromName = "{$_POST['First_Name']} {$_POST['Last_Name']}"; $mail->Subject = "Request1"; }else{ $mail->FromName = "{$_POST['Contact_Name']}"; $mail->Subject = "Contact form"; } $text = "\n"; $html = "<table>"; foreach($_POST as $v=>$l){ if(is_array($l)) $l=implode(', ', $l); $text .= "{$v}: {$l}\n\n"; $html .= "<tr><td>{$v}:</td><td> {$l}</td></tr>"; } $html .= "</table>"; $mail->Body = $html; $mail->AltBody = $text; $mail->AddAddress($row['listing_contact'], $row['listing_title']); if($row['listing_cccontact']!='') $mail->AddAddress($row['listing_cccontact'], $row['listing_title']); //$mail->AddAttachment($_FILES['attach']['tmp_name'], $_FILES['attach']['name']); if(!$mail->Send()) echo "There has been a mail error sending to Contact<br>"; // Clear all addresses and attachments for next loop $mail->ClearAddresses(); $mail->ClearAttachments(); ?> <script language="Javascript"> window.alert("Thank you for your request.\n We will contact you soon."); window.location = "index.php"; </script> (edited to put in the tags) -
Parse error: syntax error, unexpected T_STRING on line 29
tim_ver replied to tim_ver's topic in PHP Coding Help
There is no junk mail folder for the email I enter. I did try also a yahoo and checked all folders but nothing. Arghhh -
Parse error: syntax error, unexpected T_STRING on line 29
tim_ver replied to tim_ver's topic in PHP Coding Help
So why is it not working? What am I missing? I am not getting the auto response back. Thanks -
Parse error: syntax error, unexpected T_STRING on line 29
tim_ver replied to tim_ver's topic in PHP Coding Help
Ok here it is for form1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Form1</title> <style type="text/css"> <!-- body,td,th { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; } body { background-image: url(); background-repeat: repeat-y; background-position:center; background-color:#ffffff; margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } --> </style> </style> <script type="text/javascript" language="javascript" charset="utf-8"> // <![CDATA[ function Check() { error = ''; if(document.frm.Email.value=='') { error += 'Email is required\n'; } if(document.frm.First_Name.value=='') { error += 'First name is required\n'; } if(document.frm.Last_Name.value=='') { error += 'Last name is required\n'; } if(document.frm.Phone_Number.value=='') { error += 'Phone number is required\n'; } if(error!=''){ window.alert(error); return false; } return true; } // ]]> $autotype autotype = 1 </script> </head> <body> <table width="754" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td> </td> </tr> <tr> <td background="images/bg.jpg" align="center"> </td> </tr> <tr> <td> </td> </tr--> <tr> <td height="1955"> <h1 align="center">Online form1</h1> <form name="frm" method="post" action="send.php?ID=<?=$_GET['ID'];?>" onsubmit="javascript: return Check();"> <table width="100%" cellpadding="12"> <tr> <td>Please fill out this form.</td> </tr> <tr><td>Right now I am:</td></tr> <tr><td> <input type="radio" name="Right_now_I_am" value="Ready to hire"/> Ready<br/> <input type="radio" name="Right_now_I_am" value="Evaluating "/> Evaluating<br/> <input type="radio" name="Right_now_I_am" value="Looking for information"/> Looking for information</td></tr> <tr><td>I would like to complete this project by:</td></tr> <tr><td> <? $months[1] = "January"; $months[2] = "February"; $months[3] = "March"; $months[4] = "April"; $months[5] = "May"; $months[6] = "June"; $months[7] = "July"; $months[8] = "August"; $months[9] = "September"; $months[10] = "October"; $months[11] = "November"; $months[12] = "December"; ?> <select name="Project_completion_month"> <option value="">Month</option> <? foreach($months as $month){ ?> <option value="<?=$month;?>"><?=$month;?></option> <? } ?> </select> <select name="Project_completion_year"><option value="">Year</option><? for($now = date('Y'), $i=($now+50); $i>=($now-50); $i--){?><option value="<?=$i;?>"><?=$i;?></option><?}?></select> </td></tr> <tr><td align="justify">What is your total budget for your project?</td></tr> <tr><td> <select name="Total_Budget"> <option value="Less than $ 300" selected>Less than $ 300</option> <option value="$300 to $ 1000">$300 to $ 1000</option> </select> </td></tr> <tr><td align="justify">What type of project?</td></tr> <tr><td> <input type="checkbox" name="Type_of_project[1]" value="New"/> Project1<br/> <input type="checkbox" name="Type_of_project[2]" value="Existing"/> Project2<br/> <input type="checkbox" name="Type_of_project[3]" value="Major "/> Project3<br/> <input type="checkbox" name="Type_of_project[4]" value="Add To"/> Project4</td> </tr> <tr><td align="justify">Please describe the type of project you are looking to have complete:</td></tr> <tr><td> <textarea name="Describe_type_of_project" style="width:100%; height: 50px;"></textarea> </td></tr> <tr> <td align="justify">Do you have any questionsl.</td> </tr> <tr><td> <select name="survey"> <option value="--">--</option> <option value="Yes">Yes</option> <option value="No">No</option> </select> </td></tr> <tr><td> <textarea name="Additional_Details" style="width:100%; height: 50px;"></textarea> </td></tr> <tr> <td><b>Street Address:</b></td> </tr> <tr><td><input type="text" name="Address" size="60"/></td></tr> <tr><td>City:</td></tr> <tr><td><input type="text" name="City" size="30"/></td></tr> <tr><td>State:</td></tr> <tr><td><input type="text" name="State" size="2"/></td></tr> <tr><td>Zip Code:</td></tr> <tr><td><input type="text" name="Zip" size="5"/></td></tr> <tr><td><b>Your Contact Information:</b></td></tr> <tr><td><font color="red">*</font>Email:</td></tr> <tr><td><input name="Email" type="text" size="30"/></td></tr> <tr><td><font color="red">*</font>First Name:</td></tr> <tr><td><input type="text" name="First_Name" size="40"/></td></tr> <tr><td><font color="red">*</font>Last Name:</td></tr> <tr><td><input type="text" name="Last_Name" size="40"/></td></tr> <tr><td><font color="red">*</font>Phone Number you can be reached at 8-5. M-F:</td></tr> <tr><td><input type="text" name="Phone_Number" size="20"/></td></tr> <tr><td>Additional Services</td></tr> <tr> <td align="justify">Please select other services that you need :</td> </tr> <tr><td> <input type="checkbox" name="Additional_services[1]" value="one"/>one<br/> <input type="checkbox" name="Additional_services[2]" value="two"/>two<br/> <input type="checkbox" name="Additional_services[3]" value="three"/> three</td> </tr> <tr><td>How did you find out about this website:</td></tr> <tr><td> <select name="How_did_you_find_us"> <option value="Online">Online</option> <option value="Newspaper">Newspaper</option> <option value="Magazine">Magazine</option> <option value="Word of mouth">Word of mouth</option> <option value="Radio">Radio</option> <option value="TV">TV</option> </select> </td></tr> <tr><td align="center"><input type="submit"/></td></tr> <tr> <td colspan="2"><font color="red">* = Fields are required</font></td> </tr> </table> </form> <p> </p></td> </tr> </table> <center> </center> </body> </html> -
Parse error: syntax error, unexpected T_STRING on line 29
tim_ver replied to tim_ver's topic in PHP Coding Help
Ok will do. The forms work fine and I am getting the great just no auto responders are being sent back to the email the users put in the form. -
Parse error: syntax error, unexpected T_STRING on line 29
tim_ver replied to tim_ver's topic in PHP Coding Help
Anyone help me on this, just need a little direction. Thanks -
Parse error: syntax error, unexpected T_STRING on line 29
tim_ver replied to tim_ver's topic in PHP Coding Help
Ok, I am new to this way of auto response. The issue is the all forms goto the same email account so I need to have a different response for each form defined. I figured this was the easiest but it is not turing out to be it now, better way to do this? I have have four forms and on each for I have this code: $autotype autotype = 1 Then in the send.php the code you gave above plus the line above it I gave. I want it to email the response detailed in the line to the email they give in the text box on the form. So what I am thinking is that the line you have receipent@domain.com need to be replaced with a value like Email and then Email has to be defined in the Send.php, right? Thanks -
Parse error: syntax error, unexpected T_STRING on line 29
tim_ver replied to tim_ver's topic in PHP Coding Help
Ok, but with your changes it does not do hat I want it to. I want to email the response to the email they enter in the email box on the form. I have 4 forms and each are numbered 1-4 so each get a unique response back. Thanks -
Parse error: syntax error, unexpected T_STRING on line 29
tim_ver replied to tim_ver's topic in PHP Coding Help
Nope same error still. This is what I have now and also the line above it $autotype; if ($autotype == 1){mail(email to, Email, Thank you for your request. We will be in touch in 24 hours.)}; -
I keep getting this error when I submit my online form: Parse error: syntax error, unexpected T_STRING This is the line it is complaining about: if ($autotype = 1){mail(email to, Email, Thank you for your request. We will be in touch in 24 hours.)}; What am I missing? Thanks
-
Ok, should I put bot snipits of code at the top of each on does it matter? This is what I have now: In the form: $autotype $autotype = 1 In send.php: if ($autotype == 1){ mail(email to, Email, Thank you for your request. We will be in touch in 24 hours.) } Thanks
-
I wanted to put a calender on my website to allow people to see up coming clasess we have and allow them to booking/pay for them also. I would add them in the back end and how many spots are availble and when someone clicks on to pay for the class and checks out all the way it would subtract it from the total amount. I would also like it to show on the date when all spots are gone Sold out and when only one is left only 1 spot left. I would like to see if there is a script out already that does this now. I am new to php/mysql so it would be great to find this. Anyone know of any scripts like this? Thanks much
-
Ok not sure if I need to post here or in PHP/Msql but I have one last issue on this PSD to Html issue. I have everything done except I have a drop down menu taht I need to lay over the top of one of the image slices. I have tried to do a draw layer over the image and then put the drop down in it. Put when I do this it does not work I get an error. If I put it at the bottom of the page it works fine so I do I get this to lay over the image? Please help me here. Thanks much