aebstract
-
Posts
1,105 -
Joined
-
Last visited
Posts posted by aebstract
-
-
hmm, I put this in a file:
<?php mail('aebstract@gmail.com','Test Subject','Test Message'); ?>
just as you said, checked my logs and don't have any errors and haven't received an email.
-
you're saying you think that is why the email won't send? i don't think so.
-
okay so it really isn't that big of a deal then? moving on... the email is not being sent, is there a reason in this code for that? it seems like it should work to me :/
-
[Wed Dec 17 16:30:00 2008] [error] [client 70.155.67.57] PHP Notice: Undefined index: name2 in /home/virtual/site21/fst/var/www/html/contform.php on line 253 [Wed Dec 17 16:30:00 2008] [error] [client 70.155.67.57] PHP Notice: Undefined index: company in /home/virtual/site21/fst/var/www/html/contform.php on line 258 [Wed Dec 17 16:30:00 2008] [error] [client 70.155.67.57] PHP Notice: Undefined index: email in /home/virtual/site21/fst/var/www/html/contform.php on line 263 [Wed Dec 17 16:30:00 2008] [error] [client 70.155.67.57] PHP Notice: Undefined index: phone1 in /home/virtual/site21/fst/var/www/html/contform.php on line 268 [Wed Dec 17 16:30:00 2008] [error] [client 70.155.67.57] PHP Notice: Undefined index: phone2 in /home/virtual/site21/fst/var/www/html/contform.php on line 269 [Wed Dec 17 16:30:00 2008] [error] [client 70.155.67.57] PHP Notice: Undefined index: phone3 in /home/virtual/site21/fst/var/www/html/contform.php on line 270 [Wed Dec 17 16:30:00 2008] [error] [client 70.155.67.57] PHP Notice: Undefined index: address2 in /home/virtual/site21/fst/var/www/html/contform.php on line 275 [Wed Dec 17 16:30:00 2008] [error] [client 70.155.67.57] PHP Notice: Undefined index: city in /home/virtual/site21/fst/var/www/html/contform.php on line 280 [Wed Dec 17 16:30:00 2008] [error] [client 70.155.67.57] PHP Notice: Undefined index: state in /home/virtual/site21/fst/var/www/html/contform.php on line 281 [Wed Dec 17 16:30:00 2008] [error] [client 70.155.67.57] PHP Notice: Undefined index: zip in /home/virtual/site21/fst/var/www/html/contform.php on line 286 [Wed Dec 17 16:30:03 2008] [error] [client 70.155.67.57] PHP Notice: Undefined variable: problem in /home/virtual/site21/fst/var/www/html/contform.php on line 52, referer: http://berryequipment.net/contform.php [Wed Dec 17 16:30:03 2008] [error] [client 70.155.67.57] PHP Notice: Undefined variable: type in /home/virtual/site21/fst/var/www/html/contform.php on line 78, referer: http://berryequipment.net/contform.php
this is from the error reports i have.
<?php if (isset ($_POST['submit'])) { if (empty ($_POST['name2'])) { $problem = TRUE; echo "PROBLEM NAME"; } if (empty ($_POST['company'])) { $problem = TRUE; echo "PROBLEM COMPANY"; } if (empty ($_POST['email'])) { $problem = TRUE; echo "PROBLEM EMAIL"; } if (empty ($_POST['phone1'])) { $problem = TRUE; echo "PROBLEM P1"; } if (empty ($_POST['phone2'])) { $problem = TRUE; echo "PROBLEM P2"; } if (empty ($_POST['phone3'])) { $problem = TRUE; echo "PROBLEM P3"; } if (empty ($_POST['address2'])) { $problem = TRUE; echo "PROBLEM ADDRESS"; } if (empty ($_POST['city'])) { $problem = TRUE; echo "PROBLEM CITY"; } if (empty ($_POST['state'])) { $problem = TRUE; echo "PROBLEM STATE"; } if (empty ($_POST['zip'])) { $problem = TRUE; echo "PROBLEM ZIP"; } if (empty ($_POST['level'])) { $problem = TRUE; echo "PROBLEM LEVEL"; } if (!$problem) { $name2 = $_POST['name2']; $company = $_POST['company']; $email = $_POST['email']; $phone1 = $_POST['phone1']; $phone2 = $_POST['phone2']; $phone3 = $_POST['phone3']; $address2 = $_POST['address2']; $city = $_POST['city']; $state = $_POST['state']; $zip = $_POST['zip']; $emailbody = " $name2<br /> $company<br /> $email<br /> $phone1 - $phone2 - $phone3<br /> $address2<br /> $city, $state $zip <br /><br /> Type: $type "; $to = 'aebstract@gmail.com' . ', '; // note the comma // subject $subject = 'Contingency Form'; // message $message = " <html> <head> </head> <body> $emailbody </body> </html> "; // To send HTML mail, the Content-type header must be set $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // Additional headers $headers .= 'To: Todd Berry <aebstract@gmail.com>' . "\r\n"; // Mail it mail($to, $subject, $message, $headers); header("Location: contform2.php"); } else { echo "PROBLEM"; } } ?> <html> <head> <style type="text/css"> body { text-align: center; background-color: #000000; margin: 0px; spacing: 0px; } ul { font-family: arial; font-size: 15px; margin-left: 50px; margin-right: 20px; } li { padding: 5px; } h1 { color: #ff0000; font-family: arial; font-size: 25px; margin-left: 55px; } h2 { color: #000000; font-family: arial; font-size: 20px; text-align: right; } </style> </head> <body> <div style="background-color: #FFFFFF; width: 950px; text-align: left; margin-left: auto; margin-right: auto;"> <img src="orsca.jpg" style="float: right;" /><img src="spacer.gif" height="150" /> <h1>ORSCA CONTINGENCY PROGRAM</h1> <p style="padding-left:25px; padding-right:25px; font-size: 17px; font-family: arial;">A contingency sponsorship program is an advertisement program like no other. A sponsorship program where the racer purchases your product or service before they are elegible for your sponsorship dollars. On top of that, the racer advertises your company or brand on their vehicle throughout the event and you only pay them if they are a winner or runner-up. Contingency sponsorship is an incentive program of sorts. One where you're not only exposing thousands of potential customers to your company or brand but you're ensuring that racers have an even greater reason to purchase your products or services.</p> <p style="padding-left:25px; padding-right:25px; font-size: 17px; font-family: arial;">Let us face it, you will not find a racer that thinks they are going to lose on any given weekend. Each and every racer believes that he or she can win and they are right. On any given weekend anyone can win a drag race. With the right performance parts and tuning a racer can set themselves up to have that little edge. Remember, what is fast on Sunday sells on Monday.</p> <p style="padding-left:25px; padding-right:25px; font-size: 17px; font-family: arial;">So how does this contingency program work? There is a list of criteria a racer must meet in order to receive any monetary compensation.</p> <ul> <li>Competitors must first purchase the nominated product or service and be actively using the product or service before they are eligible for your contingency rewards.</li> <li>Your company or product decal must be displayed in an easy to view position on the race car.</li> <li>Sponsors may include special requirekents such as proof of purchase, serial numbers, etc.</li> <li>Any competitor found falsly claiming product use or applying decals after start of the event will forfeit all contingency rewards for said event.</li> <li>Competitors must be a member of the Outlaw Racing Street Car Association to be eligible for prizes.</li> <li>Contigency rewards are limited only to finishers designated by sponsor. (EX: winner and runner-up)</li> <li>ORSCA will inspect all contingency winning cars for proper sticker placement, part receipt, etc.</li> </ul> <br /><br /><br /> <h1>SPONSOR WILL RECEIVE THE FOLLOWING</h1> <ul> <li>Company or product banner along race wall.</li> <li>PA Announcements promoting your company and/or products.</li> <li>All promos will have sponsoring company's logo (ex: t-shirts, flyers, etc.)</li> <li>ORSCA will post all results for contingency payouts along with sponsor mention.</li> <li>All sponsored cars will run your logo.</li> <li>ORSCA will examine all cars making sure all criteria is met for competitor eligibility</li> </ul> <br /><br /> <h1>SIGN UP</h1> <form action="contform.php" method="post" name"contact"> <table cellspacing="0" cellpadding="10" style="color:#000000; font-family: arial; font-size: 13px;" align="center"> <tr><td valign="top"> <br /> <h2>Contingency Levels </h2> <?php echo " <p> <table cellspacing=\"0\" cellpadding=\"5\" style=\"color:#999999; font-family: arial; font-size: 13px;\" align=\"right\"> <tr style=\"color:#000000; font-family: arial; font-size: 13px;\"><td> Level </td><td width=10></td><td> Winner </td><td width=10></td><td> Runner Up </td></tr> <tr bgcolor=\"#000000\"><td> <input type=\"radio\" name=\"level\" value=\"a\" checked />A </td><td width=10></td><td> 300 </td><td width=10></td><td> 150 </td></tr> <tr bgcolor=\"#333333\"><td> <input type=\"radio\" name=\"level\" value=\"b\" />B </td><td width=10></td><td> 200 </td><td width=10></td><td> 100 </td></tr><tr bgcolor=\"#000000\"><td> <input type=\"radio\" name=\"level\" value=\"c\" />C </td><td width=10></td><td> 100 </td><td width=10></td><td> 50 </td></tr> </table> </p> <p style=\"color:#000000; font-family: arial; font-size: 15px;\"><br /><br />There will be a one-time administrative setup fee of $1800.</p> "; ?> </td><td valign="top"> <?php echo " <table cellspacing=\"0\" cellpadding=\"10\" style=\"color:#999999; font-family: arial; font-size: 13px;\"> <tr bgcolor=\"#000\"><td align=\"right\"> Name </td><td> <input type=\"text\" maxlength=\"20\" class=\"textfield2\" name=\"name2\" value=\"$_POST[name2]\" size=\"20\" /> </td></tr> <tr bgcolor=\"#333333\"><td align=\"right\"> Company Name </td><td> <input type=\"text\" maxlength=\"20\" class=\"textfield2\" name=\"company\" value=\"$_POST[company]\" size=\"20\" /> </td></tr> <tr bgcolor=\"#000\"><td align=\"right\"> Email </td><td> <input type=\"text\" maxlength=\"20\" class=\"textfield2\" name=\"email\" value=\"$_POST[email]\" size=\"30\" /> </td></tr> <tr bgcolor=\"#000\"><td align=\"right\"> Phone Number </td><td> <input type=\"text\" maxlength=\"3\" class=\"textfield2\" name=\"phone1\" value=\"$_POST[phone1]\" size=\"3\" /> <input type=\"text\" maxlength=\"3\" class=\"textfield2\" name=\"phone2\" value=\"$_POST[phone2]\" size=\"3\" /> <input type=\"text\" maxlength=\"4\" class=\"textfield2\" name=\"phone3\" value=\"$_POST[phone3]\" size=\"4\" /> </td></tr> <tr bgcolor=\"#333333\"><td align=\"right\"> Address </td><td> <input type=\"text\" maxlength=\"20\" class=\"textfield2\" name=\"address2\" value=\"$_POST[address2]\" size=\"20\" /> </td></tr> <tr bgcolor=\"#000\"><td align=\"right\"> City, State </td><td> <input type=\"text\" maxlength=\"20\" class=\"textfield2\" name=\"city\" value=\"$_POST[city]\" size=\"13\" /> <input type=\"text\" maxlength=\"2\" class=\"textfield2\" name=\"state\" value=\"$_POST[state]\" size=\"2\" /> </td></tr> <tr bgcolor=\"#333333\"><td align=\"right\"> Zip </td><td align=\"right\"> <input type=\"text\" maxlength=\"5\" class=\"textfield2\" name=\"zip\" value=\"$_POST[zip]\" size=\"5\" /> </td></tr> <tr><td align=\"right\"> </td><td align=\"right\"> <input type=\"submit\" name=\"submit\" value=\"Submit\" /> </td></tr> </table> "; ?> </td> </tr> </table> </form> </div> </body> </html>
-
ha =D thanks
-
Probably something simple, and I hope it is, but my contact form isn't working atm. It is echoing out every error that is made at the top of the page. So it sees the variables as empty.
<?php if (isset ($_POST['submit'])) { if (empty ($_POST['name2'])) { $problem = TRUE; echo "PROBLEM NAME"; } if (empty ($_POST['company'])) { $problem = TRUE; echo "PROBLEM COMPANY"; } if (empty ($_POST['email'])) { $problem = TRUE; echo "PROBLEM EMAIL"; } if (empty ($_POST['phone1'])) { $problem = TRUE; echo "PROBLEM P1"; } if (empty ($_POST['phone2'])) { $problem = TRUE; echo "PROBLEM P2"; } if (empty ($_POST['phone3'])) { $problem = TRUE; echo "PROBLEM P3"; } if (empty ($_POST['address2'])) { $problem = TRUE; echo "PROBLEM ADDRESS"; } if (empty ($_POST['city'])) { $problem = TRUE; echo "PROBLEM CITY"; } if (empty ($_POST['state'])) { $problem = TRUE; echo "PROBLEM STATE"; } if (empty ($_POST['zip'])) { $problem = TRUE; echo "PROBLEM ZIP"; } if (empty ($_POST['level'])) { $problem = TRUE; echo "PROBLEM LEVEL"; } if (!$problem) { $name2 = $_POST['name2']; $company = $_POST['company']; $email = $_POST['email']; $phone1 = $_POST['phone1']; $phone2 = $_POST['phone2']; $phone3 = $_POST['phone3']; $address2 = $_POST['address2']; $city = $_POST['city']; $state = $_POST['state']; $zip = $_POST['zip']; $emailbody = " $name2<br /> $company<br /> $email<br /> $phone1 - $phone2 - $phone3<br /> $address2<br /> $city, $state $zip <br /><br /> Type: $type "; $to = 'aebstract@gmail.com' . ', '; // note the comma // subject $subject = 'Contingency Form'; // message $message = " <html> <head> </head> <body> $emailbody </body> </html> "; // To send HTML mail, the Content-type header must be set $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // Additional headers $headers .= 'To: Todd Berry <aebstract@gmail.com>' . "\r\n"; // Mail it mail($to, $subject, $message, $headers); header("Location: contform2.php"); } else { echo "PROBLEM"; } } ?> <html> <head> <style type="text/css"> body { text-align: center; background-color: #000000; margin: 0px; spacing: 0px; } ul { font-family: arial; font-size: 15px; margin-left: 50px; margin-right: 20px; } li { padding: 5px; } h1 { color: #ff0000; font-family: arial; font-size: 25px; margin-left: 55px; } h2 { color: #000000; font-family: arial; font-size: 20px; text-align: right; } </style> </head> <body> <div style="background-color: #FFFFFF; width: 950px; text-align: left; margin-left: auto; margin-right: auto;"> <img src="orsca.jpg" style="float: right;" /><img src="spacer.gif" height="150" /> <h1>ORSCA CONTINGENCY PROGRAM</h1> <p style="padding-left:25px; padding-right:25px; font-size: 17px; font-family: arial;">A contingency sponsorship program is an advertisement program like no other. A sponsorship program where the racer purchases your product or service before they are elegible for your sponsorship dollars. On top of that, the racer advertises your company or brand on their vehicle throughout the event and you only pay them if they are a winner or runner-up. Contingency sponsorship is an incentive program of sorts. One where you're not only exposing thousands of potential customers to your company or brand but you're ensuring that racers have an even greater reason to purchase your products or services.</p> <p style="padding-left:25px; padding-right:25px; font-size: 17px; font-family: arial;">Let us face it, you will not find a racer that thinks they are going to lose on any given weekend. Each and every racer believes that he or she can win and they are right. On any given weekend anyone can win a drag race. With the right performance parts and tuning a racer can set themselves up to have that little edge. Remember, what is fast on Sunday sells on Monday.</p> <p style="padding-left:25px; padding-right:25px; font-size: 17px; font-family: arial;">So how does this contingency program work? There is a list of criteria a racer must meet in order to receive any monetary compensation.</p> <ul> <li>Competitors must first purchase the nominated product or service and be actively using the product or service before they are eligible for your contingency rewards.</li> <li>Your company or product decal must be displayed in an easy to view position on the race car.</li> <li>Sponsors may include special requirekents such as proof of purchase, serial numbers, etc.</li> <li>Any competitor found falsly claiming product use or applying decals after start of the event will forfeit all contingency rewards for said event.</li> <li>Competitors must be a member of the Outlaw Racing Street Car Association to be eligible for prizes.</li> <li>Contigency rewards are limited only to finishers designated by sponsor. (EX: winner and runner-up)</li> <li>ORSCA will inspect all contingency winning cars for proper sticker placement, part receipt, etc.</li> </ul> <br /><br /><br /> <h1>SPONSOR WILL RECEIVE THE FOLLOWING</h1> <ul> <li>Company or product banner along race wall.</li> <li>PA Announcements promoting your company and/or products.</li> <li>All promos will have sponsoring company's logo (ex: t-shirts, flyers, etc.)</li> <li>ORSCA will post all results for contingency payouts along with sponsor mention.</li> <li>All sponsored cars will run your logo.</li> <li>ORSCA will examine all cars making sure all criteria is met for competitor eligibility</li> </ul> <br /><br /> <h1>SIGN UP</h1> <form action="contform.php" method="post" name"contact"> <table cellspacing="0" cellpadding="10" style="color:#000000; font-family: arial; font-size: 13px;" align="center"> <tr><td valign="top"> <br /> <h2>Contingency Levels </h2> <?php echo " <p> <table cellspacing=\"0\" cellpadding=\"5\" style=\"color:#999999; font-family: arial; font-size: 13px;\" align=\"right\"> <tr style=\"color:#000000; font-family: arial; font-size: 13px;\"><td> Level </td><td width=10></td><td> Winner </td><td width=10></td><td> Runner Up </td></tr> <tr bgcolor=\"#000000\"><td> <input type=\"radio\" name\"level\" value=\"a\" checked />A </td><td width=10></td><td> 300 </td><td width=10></td><td> 150 </td></tr> <tr bgcolor=\"#333333\"><td> <input type=\"radio\" name\"level\" value=\"b\" />B </td><td width=10></td><td> 200 </td><td width=10></td><td> 100 </td></tr><tr bgcolor=\"#000000\"><td> <input type=\"radio\" name\"level\" value=\"c\" />C </td><td width=10></td><td> 100 </td><td width=10></td><td> 50 </td></tr> </table> </p> <p style=\"color:#000000; font-family: arial; font-size: 15px;\"><br /><br />There will be a one-time administrative setup fee of $1800.</p> "; ?> </td><td valign="top"> <?php echo " <table cellspacing=\"0\" cellpadding=\"10\" style=\"color:#999999; font-family: arial; font-size: 13px;\"> <tr bgcolor=\"#000\"><td align=\"right\"> Name </td><td> <input type=\"text\" maxlength=\"20\" class=\"textfield2\" name\"name2\" value=\"$_POST[name2]\" size=\"20\" /> </td></tr> <tr bgcolor=\"#333333\"><td align=\"right\"> Company Name </td><td> <input type=\"text\" maxlength=\"20\" class=\"textfield2\" name\"company\" value=\"$_POST[company]\" size=\"20\" /> </td></tr> <tr bgcolor=\"#000\"><td align=\"right\"> Email </td><td> <input type=\"text\" maxlength=\"20\" class=\"textfield2\" name\"email\" value=\"$_POST[emalil]\" size=\"30\" /> </td></tr> <tr bgcolor=\"#000\"><td align=\"right\"> Phone Number </td><td> <input type=\"text\" maxlength=\"3\" class=\"textfield2\" name\"phone1\" value=\"$_POST[phone1]\" size=\"3\" /> <input type=\"text\" maxlength=\"3\" class=\"textfield2\" name\"phone2\" value=\"$_POST[phone2]\" size=\"3\" /> <input type=\"text\" maxlength=\"4\" class=\"textfield2\" name\"phone3\" value=\"$_POST[phone3]\" size=\"4\" /> </td></tr> <tr bgcolor=\"#333333\"><td align=\"right\"> Address </td><td> <input type=\"text\" maxlength=\"20\" class=\"textfield2\" name\"address2\" value=\"$_POST[address2]\" size=\"20\" /> </td></tr> <tr bgcolor=\"#000\"><td align=\"right\"> City, State </td><td> <input type=\"text\" maxlength=\"20\" class=\"textfield2\" name\"city\" value=\"$_POST[city]\" size=\"13\" /> <input type=\"text\" maxlength=\"2\" class=\"textfield2\" name\"state\" value=\"$_POST[state]\" size=\"2\" /> </td></tr> <tr bgcolor=\"#333333\"><td align=\"right\"> Zip </td><td align=\"right\"> <input type=\"text\" maxlength=\"5\" class=\"textfield2\" name\"zip\" value=\"$_POST[zip]\" size=\"5\" /> </td></tr> <tr><td align=\"right\"> </td><td align=\"right\"> <input type=\"submit\" name=\"submit\" value=\"Submit\" /> </td></tr> </table> "; ?> </td> </tr> </table> </form> </div> </body> </html>
-
Didn't do anything :/
-
<?php $file = 'image.jpg'; $image = imagecreatefromjpeg($file); list($width, $height) = getimagesize($file); $font = 'arial.ttf'; $size = 8; $title = 'Last played:'; $artist = 'artist name'; $song = 'song name'; $colorHex = '000000'; list($tr, $tg, $tb) = sscanf($colorHex, '%02X%02X%02X'); $textColor = imagecolorallocate($image, $tr, $tg, $tb); imagettftext($image, $size, 0, 4, $height-29, $textColor, $font, trim($title)); imagettftext($image, $size, 0, 4, $height-17, $textColor, $font, trim($song)); imagettftext($image, $size, 0, 4, $height-5, $textColor, $font, trim($artist)); imagejpeg($image, 'image2.jpg', 95); ?>
Trying to place text on top of an existing image and create a new image from that. Once I figure out how to reference values from another website, it should be able to update automatically with certain bits of information.. as it changes on that site. Right now it isn't working really at all. Could someone possibly help on this?
-
Cool, I have no clue how that happened but glad you saw it. thanks
-
Sigh
<?php $content .= " <table align=center> <tr><td> <a onclick=\"return showPic(this);\" href=\"/ph/main.jpg\" title=\"Main ph assembly\">Main ph assembly</a> <br /><br /> $content .= "</td><td align=\"center\"> <p><a href=\"/ph/mainL.jpg\" rel=\"lightbox\" title=\"ph Assembly Drawings\"><img id=\"placeholder\" src=\"/ph/main.jpg\" alt=\"\" border=\"0\" /></a></p> <br /> Click image to view full size. </td><td> </td></tr> </table> "; $content .="<br /><br />"; $color1 = "#dddddd"; $color2 = "#c0c0c0"; $row_count = 0; $parts .= "<center> <form action=\"/cart/\" method=\"post\"> <table width=732 cellpadding=3><tr bgcolor=#8d8d8d cellspacing=6><td width=10 align=center class=tclassd><a href=\"/order/ph/\">LOC</a></td><td width=100 class=tclassd><a href=\"/order/ph/pn/\">Part Number</a></td><td width=475>Description</td><td width=50>Price</td><td>QTY</td></tr>"; if ($order == pn){ $orderby = PN; } else { $orderby = LOC; } $result2 = mysql_query("SELECT * FROM parts WHERE MCHN='ph' ORDER BY $orderby, SUB ASC") or DIE(mysql_error()); while($r2=mysql_fetch_array($result2)) { $pid=$r2["id"]; $loc=$r2["LOC"]; $pn=$r2["PN"]; $desc=$r2["DESC"]; $price=$r2["PRICE"]; $sub=$r2["SUB"]; $tpn=$r2["TPN"]; $row_color = ($row_count % 2) ? $color1 : $color2; $quan = ($_SESSION['cart'][$pid] < 1) ? "0" : $_SESSION['cart'][$pid]; if($_SESSION["id"] == 92) { $adminedit = "<td align=center bgcolor=\"$row_color\"><a href=\"/accounthome/tools/changeparts/$pid/\"><img src=\"/images/pencil.gif\" border=\"0\" /></a></td>"; } if ($pt == 1){ if (!empty($tpn)) { if ($sub == 0){ $parts .= "<tr cellspacing=6><td align=center bgcolor=\"$row_color\">$loc</td><td bgcolor=\"$row_color\" width=\"100\">$tpn</td><td bgcolor=\"$row_color\" width=\"330\">$desc <font size=\"1\">Berry Part # $pn</font></td><td bgcolor=\"$row_color\" align=\"right\">$price</td><td bgcolor=\"$row_color\"><input type=\"text\" size=\"5\" name='items_quantity[{$pid}]' value=\"".$quan."\" /></td>$adminedit</tr>"; } else { $parts .= "<tr cellspacing=6><td align=center bgcolor=\"#ebebeb\">$loc-$sub</td><td bgcolor=\"#ebebeb\" width=\"100\">$tpn</td><td bgcolor=\"#ebebeb\" width=\"330\">$desc <font size=\"1\">Berry Part # $pn</font></td><td bgcolor=\"#ebebeb\" align=\"right\">$price</td><td bgcolor=\"#ebebeb\"><input type=\"text\" size=\"5\" name='items_quantity[{$pid}]' value=\"".$quan."\" /></td>$adminedit</tr>"; } } else { if ($sub == 0){ $parts .= "<tr cellspacing=6><td align=center bgcolor=\"$row_color\">$loc</td><td bgcolor=\"$row_color\" width=\"100\">$pn</td><td bgcolor=\"$row_color\" width=\"330\">$desc</td><td bgcolor=\"$row_color\" align=\"right\">$price</td><td bgcolor=\"$row_color\"><input type=\"text\" size=\"5\" name='items_quantity[{$pid}]' value=\"".$quan."\" /></td>$adminedit</tr>"; } else { $parts .= "<tr cellspacing=6><td align=center bgcolor=\"#ebebeb\">$loc-$sub</td><td bgcolor=\"#ebebeb\" width=\"100\">$pn</td><td bgcolor=\"#ebebeb\" width=\"330\">$desc</td><td bgcolor=\"#ebebeb\" align=\"right\">$price</td><td bgcolor=\"#ebebeb\"><input type=\"text\" size=\"5\" name='items_quantity[{$pid}]' value=\"".$quan."\" /></td>$adminedit</tr>"; } } } else { if ($sub == 0){ $parts .= "<tr cellspacing=6><td align=center bgcolor=\"$row_color\">$loc</td><td bgcolor=\"$row_color\" width=\"100\">$pn</td><td bgcolor=\"$row_color\" width=\"330\">$desc</td><td bgcolor=\"$row_color\" align=\"right\">$price</td><td bgcolor=\"$row_color\"><input type=\"text\" size=\"5\" name='items_quantity[{$pid}]' value=\"".$quan."\" /></td>adminedit</tr>"; } else { $parts .= "<tr cellspacing=6><td align=center bgcolor=\"#ebebeb\">$loc-$sub</td><td bgcolor=\"#ebebeb\" width=\"100\">$pn</td><td bgcolor=\"#ebebeb\" width=\"330\">$desc</td><td bgcolor=\"#ebebeb\" align=\"right\">$price</td><td bgcolor=\"#ebebeb\"><input type=\"text\" size=\"5\" name='items_quantity[{$pid}]' value=\"".$quan."\" /></td>adminedit</tr>"; } } $row_count++; } if (isset($_SESSION['cart'])) { $cartbutton = "Update Cart"; } else { $cartbutton = "Add To Cart"; } $parts .= "</table><p align=right><input type=\"submit\" name=\"submit\" class=\"textfield\" value=\"$cartbutton\" /></p></form></center>"; if (ph == ph){ $content .= "<h1>Paw Harvester</h1>"; } $content .= "$parts"; ?>
Parse error: syntax error, unexpected '/' in /home/virtual/site21/fst/var/www/html/images/ph/ph.php on line 13
-
copy/pasted your code:
Notice: Undefined index: namef in /homepages/12/d224766608/htdocs/web-vrd/new/contact.php on line 51
Notice: Undefined index: emailf in /homepages/12/d224766608/htdocs/web-vrd/new/contact.php on line 54
Notice: Undefined index: subjectf in /homepages/12/d224766608/htdocs/web-vrd/new/contact.php on line 57
-
Actually, no. I had removed the 's and threw them back in real fast to post it for you, then had the typo. Same error with this "fix":
<?php header("Cache-control: private"); if (isset ($_POST['submit'])) { $problem = FALSE; if (empty ($_POST['namef'])) { $problem = TRUE; } if (empty ($_POST['subjectf'])) { $problem = TRUE; } if (empty ($_POST['emailf'])) { $problem = TRUE; } if (empty ($_POST['messagef'])) { $problem = TRUE; } if (!$problem) { $namef = $_POST['namef']; $subjectf = $_POST['subjectf']; $emailf = $_POST['email']; $messagef = $_POST['messagef']; $sendmail = " $namef $emailf $subjectf $messagef "; mail ('aebstract@gmail.com', 'Vengeance - Contact Form', $sendmail, 'From: $emailf'); header("Location: site.php?page=contact&msg=sent"); } } $content = <<<html <p class="bodycontent"> <table width="750"> <tr> <td valign="top" width="350"> <center> Phone: 678-513-7105<br /> Fax: 678-513-7063<br /><br /><br /> Monday - Friday: 10:00am - 5:00pm<br /> (Close 12:00 noon - 1:00pm)<br /> Saturday - By Appointment Only<br /><br /> Mike (Owner/President)<br /> <a href="mailto:mike@vengeancerd.com">mike@vengeancerd.com</a><br /><br /> Ron Mowen (General Manager/Sales)<br /> <a href="mailto:ron@vengeancerd.com">ron@vengeancerd.com</a><br /><br /> Buddy Daniel (Project Specialist/Technician)<br /> <a href="mailto:buddy@vengeancerd.com">buddy@vengeancerd.com</a><br /><br /> Charlie Hill (Pedders Suspension Specialist)<br /> <a href="mailto:charlieh@vengeancerd.com">charlieh@vengeancerd.com</a><br /><br /> </center> </td> <td align="right"> html; if (isset($_GET['msg'])){ $content .= <<<html Thank you. Your message has been received and will be viewed shortly. html; } else { $content .= <<<html <form method="POST" action="site.php?page=contact" name="contact"> <table> <tr><td valign="top" align="right"> Name: </td><td> <input type="text" class="txt" name="namef" maxlength="20" size="20" value="$_POST['namef']" /> </td></tr> <tr><td valign="top" align="right"> Email: </td><td> <input type="text" class="txt" name="emailf" maxlength="20" size="20" value="$_POST['emailf']" /> </td></tr> <tr><td valign="top" align="right"> Subject: </td><td> <input type="text" class="txt" name="subjectf" maxlength="20" size="20" value="$_POST['subjectf']" /> </td></tr> <tr><td valign="top" align="right"> Message: </td><td> <textarea name="messagef" cols="36" rows="4" class="txt"></textarea> </td></tr> <tr><td></td><td align="right"> <input type="submit" value="Send" /> </td> </tr> </table> </form> html; } $content .= <<<html </td> </tr> </table> <br /><br /> <center> 241 Castleberry Industrial Drive, Suite B<br /> Cumming, GA 30040 <br /> <iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&hl=en&geocode=&q=241+Castleberry+Industrial+Dr+Cumming,+GA+30040-9051,+US&sll=37.0625,-95.677068&sspn=33.764224,79.101563&ie=UTF8&ll=34.207614,-84.144716&spn=0.008608,0.019312&z=14&g=241+Castleberry+Industrial+Dr+Cumming,+GA+30040-9051,+US&output=embed&s=AARTsJoOEagJWyUHYTOwV8tNEUfVYaHWXQ"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&hl=en&geocode=&q=241+Castleberry+Industrial+Dr+Cumming,+GA+30040-9051,+US&sll=37.0625,-95.677068&sspn=33.764224,79.101563&ie=UTF8&ll=34.207614,-84.144716&spn=0.008608,0.019312&z=14&g=241+Castleberry+Industrial+Dr+Cumming,+GA+30040-9051,+US&source=embed" style="color:#0000FF;text-align:left" target="_blank">View Larger Map</a></small> </center> </p> html; ?>
-
You told me to put ' ' around the variables. $_POST['BLA']..... and I reply with an error caused by that. Come on..
EDIT: ENJOY -
<?php header("Cache-control: private"); if (isset ($_POST['submit'])) { $problem = FALSE; if (empty ($_POST['namef'])) { $problem = TRUE; } if (empty ($_POST['subjectf'])) { $problem = TRUE; } if (empty ($_POST['emailf'])) { $problem = TRUE; } if (empty ($_POST['messagef'])) { $problem = TRUE; } if (!$problem) { $namef = $_POST['namef']; $subjectf = $_POST['subjectf']; $emailf = $_POST['email']; $messagef = $_POST['messagef']; $sendmail = " $namef $emailf $subjectf $messagef "; mail ('aebstract@gmail.com', 'Vengeance - Contact Form', $sendmail, 'From: $emailf'); header("Location: site.php?page=contact&msg=sent"); } } $content = <<<html <p class="bodycontent"> <table width="750"> <tr> <td valign="top" width="350"> <center> Phone: 678-513-7105<br /> Fax: 678-513-7063<br /><br /><br /> Monday - Friday: 10:00am - 5:00pm<br /> (Close 12:00 noon - 1:00pm)<br /> Saturday - By Appointment Only<br /><br /> Mike (Owner/President)<br /> <a href="mailto:mike@vengeancerd.com">mike@vengeancerd.com</a><br /><br /> Ron Mowen (General Manager/Sales)<br /> <a href="mailto:ron@vengeancerd.com">ron@vengeancerd.com</a><br /><br /> Buddy Daniel (Project Specialist/Technician)<br /> <a href="mailto:buddy@vengeancerd.com">buddy@vengeancerd.com</a><br /><br /> Charlie Hill (Pedders Suspension Specialist)<br /> <a href="mailto:charlieh@vengeancerd.com">charlieh@vengeancerd.com</a><br /><br /> </center> </td> <td align="right"> html; if (isset($_GET['msg'])){ $content .= <<<html Thank you. Your message has been received and will be viewed shortly. html; } else { $content .= <<<html <form method="POST" action="site.php?page=contact" name="contact"> <table> <tr><td valign="top" align="right"> Name: </td><td> <input type="text" class="txt" name="namef" maxlength="20" size="20" value="$_POST['namef]'" /> </td></tr> <tr><td valign="top" align="right"> Email: </td><td> <input type="text" class="txt" name="emailf" maxlength="20" size="20" value="$_POST['emailf']" /> </td></tr> <tr><td valign="top" align="right"> Subject: </td><td> <input type="text" class="txt" name="subjectf" maxlength="20" size="20" value="$_POST['subjectf']" /> </td></tr> <tr><td valign="top" align="right"> Message: </td><td> <textarea name="messagef" cols="36" rows="4" class="txt"></textarea> </td></tr> <tr><td></td><td align="right"> <input type="submit" value="Send" /> </td> </tr> </table> </form> html; } $content .= <<<html </td> </tr> </table> <br /><br /> <center> 241 Castleberry Industrial Drive, Suite B<br /> Cumming, GA 30040 <br /> <iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&hl=en&geocode=&q=241+Castleberry+Industrial+Dr+Cumming,+GA+30040-9051,+US&sll=37.0625,-95.677068&sspn=33.764224,79.101563&ie=UTF8&ll=34.207614,-84.144716&spn=0.008608,0.019312&z=14&g=241+Castleberry+Industrial+Dr+Cumming,+GA+30040-9051,+US&output=embed&s=AARTsJoOEagJWyUHYTOwV8tNEUfVYaHWXQ"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&hl=en&geocode=&q=241+Castleberry+Industrial+Dr+Cumming,+GA+30040-9051,+US&sll=37.0625,-95.677068&sspn=33.764224,79.101563&ie=UTF8&ll=34.207614,-84.144716&spn=0.008608,0.019312&z=14&g=241+Castleberry+Industrial+Dr+Cumming,+GA+30040-9051,+US&source=embed" style="color:#0000FF;text-align:left" target="_blank">View Larger Map</a></small> </center> </p> html; ?>
-
I haven't made a single change except for taking the . off of the first instance of $content on that page. The entire file is posted.. I shouldn't have to state that I am using variables on my page for a reason, it should be a given. Does anyone know what would cause this issue rather than guesses and stabs?
-
I HAVE to use the $content .= cause I am including this file in to my index page...
-
If I put the ' ' inside the post like that, I return the following error:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /homepages/12/d224766608/htdocs/web-vrd/new/contact.php on line 94
About the being polite, I wasn't being too rude if you seriously did not even see the massive chunk of code sitting in the opening topic post and then 2 posts down ask me to post the code :/
-
Are you joking? I posted the entire script in the original post, did you even look?
-
They do match up? First error is fixed but I don't get what you're saying on the second one.
-
I got my error reporting on and am running in to a few errors, never seen these before and not sure why I'm getting them.
Here they are:
Notice: Undefined variable: content in /homepages/12/d224766608/htdocs/web-vrd/new/contact.php on line 43
Notice: Undefined index: namef in /homepages/12/d224766608/htdocs/web-vrd/new/contact.php on line 94
Notice: Undefined index: emailf in /homepages/12/d224766608/htdocs/web-vrd/new/contact.php on line 97
Notice: Undefined index: subjectf in /homepages/12/d224766608/htdocs/web-vrd/new/contact.php on line 100
Here's the file:
<?php header("Cache-control: private"); if (isset ($_POST['submit'])) { $problem = FALSE; if (empty ($_POST['namef'])) { $problem = TRUE; } if (empty ($_POST['subjectf'])) { $problem = TRUE; } if (empty ($_POST['emailf'])) { $problem = TRUE; } if (empty ($_POST['messagef'])) { $problem = TRUE; } if (!$problem) { $namef = $_POST['namef']; $subjectf = $_POST['subjectf']; $emailf = $_POST['email']; $messagef = $_POST['messagef']; $sendmail = " $namef $emailf $subjectf $messagef "; mail ('aebstract@gmail.com', 'Vengeance - Contact Form', $sendmail, 'From: $emailf'); header("Location: site.php?page=contact&msg=sent"); } } $content .= <<<html <p class="bodycontent"> <table width="750"> <tr> <td valign="top" width="350"> <center> Phone: 678-513-7105<br /> Fax: 678-513-7063<br /><br /><br /> Monday - Friday: 10:00am - 5:00pm<br /> (Close 12:00 noon - 1:00pm)<br /> Saturday - By Appointment Only<br /><br /> Mike (Owner/President)<br /> <a href="mailto:mike@vengeancerd.com">mike@vengeancerd.com</a><br /><br /> Ron Mowen (General Manager/Sales)<br /> <a href="mailto:ron@vengeancerd.com">ron@vengeancerd.com</a><br /><br /> Buddy Daniel (Project Specialist/Technician)<br /> <a href="mailto:buddy@vengeancerd.com">buddy@vengeancerd.com</a><br /><br /> Charlie Hill (Pedders Suspension Specialist)<br /> <a href="mailto:charlieh@vengeancerd.com">charlieh@vengeancerd.com</a><br /><br /> </center> </td> <td align="right"> html; if (isset($_GET['msg'])){ $content .= <<<html Thank you. Your message has been received and will be viewed shortly. html; } else { $content .= <<<html <form method="POST" action="site.php?page=contact" name="contact"> <table> <tr><td valign="top" align="right"> Name: </td><td> <input type="text" class="txt" name="namef" maxlength="20" size="20" value="$_POST[namef]" /> </td></tr> <tr><td valign="top" align="right"> Email: </td><td> <input type="text" class="txt" name="emailf" maxlength="20" size="20" value="$_POST[emailf]" /> </td></tr> <tr><td valign="top" align="right"> Subject: </td><td> <input type="text" class="txt" name="subjectf" maxlength="20" size="20" value="$_POST[subjectf]" /> </td></tr> <tr><td valign="top" align="right"> Message: </td><td> <textarea name="messagef" cols="36" rows="4" class="txt"></textarea> </td></tr> <tr><td></td><td align="right"> <input type="submit" value="Send" /> </td> </tr> </table> </form> html; } $content .= <<<html </td> </tr> </table> <br /><br /> <center> 241 Castleberry Industrial Drive, Suite B<br /> Cumming, GA 30040 <br /> <iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&hl=en&geocode=&q=241+Castleberry+Industrial+Dr+Cumming,+GA+30040-9051,+US&sll=37.0625,-95.677068&sspn=33.764224,79.101563&ie=UTF8&ll=34.207614,-84.144716&spn=0.008608,0.019312&z=14&g=241+Castleberry+Industrial+Dr+Cumming,+GA+30040-9051,+US&output=embed&s=AARTsJoOEagJWyUHYTOwV8tNEUfVYaHWXQ"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&hl=en&geocode=&q=241+Castleberry+Industrial+Dr+Cumming,+GA+30040-9051,+US&sll=37.0625,-95.677068&sspn=33.764224,79.101563&ie=UTF8&ll=34.207614,-84.144716&spn=0.008608,0.019312&z=14&g=241+Castleberry+Industrial+Dr+Cumming,+GA+30040-9051,+US&source=embed" style="color:#0000FF;text-align:left" target="_blank">View Larger Map</a></small> </center> </p> html; ?>
-
Didn't know about it Thanks
-
That's the line with the problem, take that line out and there is no error. Put it in and the error comes up, why would you need more code for this?
edit:
enjoy
<?php if (isset($_POST['submit'])){ } $content .= " <p class=\"bodycontent\"> <table width=\"750\"> <tr> <td valign=\"top\" width=\"400\"> <form method=\"POST\" action=\"index.php?page=contact\"> Name: <input type=\"text\" class=\"txt\" name=\"name\" maxlength=\"20\" size=\"20\" value=\"' . $_POST['name'] . '\" /> <br /><br /> <input type=\"submit\" value=\"Send\" /> </form> </td> <td align=\"right\" valign=\"top\"> 241 Castleberry Industrial Drive, Suite B<br /> Cumming, GA 30040 <br /><br /> Phone: 678-513-7105<br /> Fax: 678-513-7063<br /><br /><br /> <center> Mike (Owner/President)<br /> <a href=\"mailto:mike@vengeancerd.com\">mike@vengeancerd.com</a><br /><br /> Ron Mowen (General Manager/Sales)<br /> <a href=\"mailto:ron@vengeancerd.com\">ron@vengeancerd.com</a><br /><br /> Buddy Daniel (Project Specialist/Technician)<br /> <a href=\"mailto:buddy@vengeancerd.com\">buddy@vengeancerd.com</a><br /><br /> Charlie Hill (Pedders Suspension Specialist)<br /> <a href=\"mailto:charlieh@vengeancerd.com\">charlieh@vengeancerd.com</a><br /><br /> </center> </td> </tr> </table> <center> <iframe width=\"425\" height=\"350\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"http://maps.google.com/maps?f=q&hl=en&geocode=&q=241+Castleberry+Industrial+Dr+Cumming,+GA+30040-9051,+US&sll=37.0625,-95.677068&sspn=33.764224,79.101563&ie=UTF8&ll=34.207614,-84.144716&spn=0.008608,0.019312&z=14&g=241+Castleberry+Industrial+Dr+Cumming,+GA+30040-9051,+US&output=embed&s=AARTsJoOEagJWyUHYTOwV8tNEUfVYaHWXQ\"></iframe><br /><small><a href=\"http://maps.google.com/maps?f=q&hl=en&geocode=&q=241+Castleberry+Industrial+Dr+Cumming,+GA+30040-9051,+US&sll=37.0625,-95.677068&sspn=33.764224,79.101563&ie=UTF8&ll=34.207614,-84.144716&spn=0.008608,0.019312&z=14&g=241+Castleberry+Industrial+Dr+Cumming,+GA+30040-9051,+US&source=embed\" style=\"color:#0000FF;text-align:left\" target=\"_blank\">View Larger Map</a></small> </center> </p> "; ?>
-
<input type=\"text\" class=\"txt\" name=\"name\" maxlength=\"20\" size=\"20\" value=\"' . $_POST['name'] . '\" />
I've used code just like this before without error, anyone know what is wrong?
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /homepages/12/d224766608/htdocs/web-vrd/new/contact.php on line 16
-
=D thanks
-
<?php echo "<img src=\"images/$pageT.jpg\" />"; ?>
I have a variable "$page" set at the top of my file, need to put it in to this url with a capital T following the variable, just like the example shows. Right now it takes the "$pageT" right out of the link. Forgot how to do this
[SOLVED] undefined index in mail form
in PHP Coding Help
Posted
It's a hosted service, and I've had customers going to the website for a long time now and using the contact form, which we receive email from. (Just tested it and it went through almost immediately)