Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Novice designer needs help with adopted site
Old 04-09-2010, 12:19 AM Novice designer needs help with adopted site
Novice Talker

Posts: 8
Trades: 0
I am not at an expert web designer....I just so happen to be dangerous enough with Dreamweaver to manage a site and make minor changes to it.

Anyhow...my friend's designer skipped town, so I agreed to manage it for him.

Well, I am getting errors on the contact page:
http://www.palmworkshops.org/contact.php

I get this error after filling in every field:

The following errors occured while processing your form input.
You did not enter one or more of the required fields. Please go back and try again.
Invalid email address entered


Can someone please help??
lsinger9404 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-09-2010, 12:52 AM Re: Novice designer needs help with adopted site
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
Can't tell you much other than that your form validation code appears to not be working.

You're going to have to post your code if you want a better answer.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by NullPointer; 04-09-2010 at 12:54 AM..
NullPointer is online now
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 04-09-2010, 01:03 AM Re: Novice designer needs help with adopted site
Novice Talker

Posts: 8
Trades: 0
Thanks..I wasn't sure. Now I know. here it is. This is the contact.php. I believe this should be sufficient, please let me know if I should post anything else.
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/temp_main.dwt" codeOutsideHTMLIsLocked="false" -->

<head>

<!-- InstanceBeginEditable name="doctitle" -->
<title>Contact - CEU's &amp; PDH's - Palm Workshops - Online Certification - Palmworkshops.org</title>
<!-- InstanceEndEditable -->

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<!-- InstanceBeginEditable name="head" -->
<link href="styles.css" rel="stylesheet" type="text/css" />
<meta name="Keywords" content="palmworkshops.com, palm workshops, palmworkshops.org, Online Certificates, CEU, CEU's, PDH, MFT, MFCC, CAADAC, NCADD, CAADE, EAPA, LCSW, BRN, CEAP, cornerstone, palm, aery, sunrise, alcohol, drugs, campobello, Maguire, Ethics, Addiction, Azure, Recovery, Education" />
<!-- InstanceEndEditable -->

</head>

<body>

<div align="center">

<table id="Table_01" width="980" border="0" cellpadding="0" cellspacing="0">

	<tr>

		<td>

<table id="nav" width="980" border="0" cellpadding="0" cellspacing="0">

				<tr>

					<td>

						<img id="Slice_01" src="http://www.palmworkshops.org/images/background/Slice_01.gif" width="24" height="76" alt="" /><a name="top" id="top"></a></td>

					<td>

						<img id="Slice_02" src="http://www.palmworkshops.org/images/background/Slice_02.gif" width="16" height="76" alt="" /></td>

					<td class="nav_back" align="right"><table width="100%" border="0" cellspacing="0" cellpadding="0">

                      <tr>

                        <td><img src="http://www.palmworkshops.org/images/background/spacer.gif" width="200" height="76" /></td>

                        <td class="nav" id="navbar"><a href="http://www.palmworkshops.org/index.php" target="_self" title="Home - CEU's & PDH's - Palm Workshops - Online Exams - Palmworkshops.org">Home</a></td>

                        <td class="nav_div">&nbsp;</td>

                        <td class="nav" id="navbar"><a href="http://www.palmworkshops.org/about.php" target="_self" title="About - CEU's & PDH's - Palm Workshops - Online Exams - Palmworkshops.org">About</a></td>

                        <td class="nav_div">&nbsp;</td>

                        <td class="nav" id="navbar"><a href="http://www.palmworkshops.org/calendar.php" target="_self" title="Calendar - CEU's & PDH's - Palm Workshops - Online Exams - Palmworkshops.org">Calendar</a></td>

                        <td class="nav_div">&nbsp;</td>

                        <td class="nav" id="navbar"><a href="http://www.palmworkshops.org/workshops.php" target="_self" title="Workshops - CEU's & PDH's - Palm Workshops - Online Exams - Palmworkshops.org">Workshops</a></td>

                        <td class="nav_div">&nbsp;</td>

                        <td class="nav" id="navbar"><a href="http://www.palmworkshops.org/directions.php" target="_self" title="Directions - CEU's & PDH's - Palm Workshops - Online Exams - Palmworkshops.org">Directions</a></td>

                        <td class="nav_div">&nbsp;</td>

                        <td class="nav" id="navbar"><a href="http://www.palmworkshops.org/testimonials.php" target="_self" title="Testimonials - CEU's & PDH's - Palm Workshops - Online Exams - Palmworkshops.org">Testimonials</a></td>

                        <td class="nav_div">&nbsp;</td>

                        <td class="nav" id="navbar"><a href="http://www.palmworkshops.org/contact.php" target="_self" title="Contact - CEU's & PDH's - Palm Workshops - Online Exams - Palmworkshops.org">Contact</a></td>

                      </tr>

                  </table></td>

			  <td>

						<img id="Slice_14" src="http://www.palmworkshops.org/images/background/Slice_14.gif" width="16" height="76" alt="" /></td>

					<td>

						<img id="Slice_15" src="http://www.palmworkshops.org/images/background/Slice_15.gif" width="24" height="76" alt="" /></td>

				</tr>

			</table></td>

	</tr>

	<tr>

		<td>

			<table id="header" width="980" border="0" cellpadding="0" cellspacing="0">

				<tr>

					<td>

						<img id="Slice_16" src="http://www.palmworkshops.org/images/background/Slice_16.gif" width="24" height="200" alt="" /></td>

					<td><object type="application/x-shockwave-flash" data="http://www.palmworkshops.org/swf/header.swf" width="932" height="200">

<param name="movie" value="http://www.palmworkshops.org/swf/header.swf" />

<img src="http://www.palmworkshops.org/images/background/Slice_17.jpg" name="Slice_17" width="932" height="200" border="0" usemap="#head_email_link" id="Slice_17" alt="CEU's & PDH's - Palm Workshops - Online Exams - Palmworkshops.org" title="CEU's & PDH's - Palm Workshops - Online Exams - Palmworkshops.org" />

</object></td>

<td>

						<img id="Slice_18" src="http://www.palmworkshops.org/images/background/Slice_18.gif" width="24" height="200" alt="" /></td>

				</tr>

			</table></td>

	</tr>

	<tr>

		<td>

<table id="______" width="980" border="0" cellpadding="0" cellspacing="0">

				<tr>

					<td>

						<img src="http://www.palmworkshops.org/images/background/Slice_19.gif" alt="" name="Slice_19" width="24" height="10" id="Slice_19" /></td>

<td>

						<img src="http://www.palmworkshops.org/images/background/Slice_20.gif" alt="" name="Slice_20" width="16" height="10" id="Slice_20" /></td>

<td>

						<img src="http://www.palmworkshops.org/images/background/Slice_21.gif" alt="" name="Slice_21" width="610" height="10" id="Slice_21" /></td>

<td>

						<img src="http://www.palmworkshops.org/images/background/Slice_22.gif" alt="" name="Slice_22" width="16" height="10" id="Slice_22" /></td>

<td>

						<img src="http://www.palmworkshops.org/images/background/Slice_23.gif" alt="" name="Slice_23" width="8" height="10" id="Slice_23" /></td>

<td>

						<img src="http://www.palmworkshops.org/images/background/Slice_24.gif" alt="" name="Slice_24" width="16" height="10" id="Slice_24" /></td>

<td>

						<img src="http://www.palmworkshops.org/images/background/Slice_25.gif" alt="" name="Slice_25" width="250" height="10" id="Slice_25" /></td>

					<td>

						<img src="http://www.palmworkshops.org/images/background/Slice_26.gif" alt="" name="Slice_26" width="16" height="10" id="Slice_26" /></td>

					<td>

						<img src="http://www.palmworkshops.org/images/background/Slice_27.gif" alt="" name="Slice_27" width="24" height="10" id="Slice_27" /></td>

		  </tr>

				<tr>

					<td>

						<img id="Slice_28" src="http://www.palmworkshops.org/images/background/Slice_28.gif" width="24" height="32" alt="" /></td>

					<td>

						<img id="Slice_29" src="http://www.palmworkshops.org/images/background/Slice_29.gif" width="16" height="32" alt="" /></td>

					<td width="610" height="32" align="left" valign="middle" background="http://www.palmworkshops.org/images/background/Slice_30.gif" class="pagetitle"><!-- InstanceBeginEditable name="Title" -->Contact Us<!-- InstanceEndEditable --></td>

<td>

						<img id="Slice_31" src="http://www.palmworkshops.org/images/background/Slice_31.gif" width="16" height="32" alt="" /></td>

					<td>

						<img id="Slice_32" src="http://www.palmworkshops.org/images/background/Slice_32.gif" width="8" height="32" alt="" /></td>

					<td>

						<img id="Slice_33" src="http://www.palmworkshops.org/images/background/Slice_33.gif" width="16" height="32" alt="" /></td>

					<td width="250" height="32" align="left" valign="middle" background="http://www.palmworkshops.org/images/background/Slice_34.gif" class="subtitle"><!-- InstanceBeginEditable name="SubTitle" -->Palm Provides<!-- InstanceEndEditable --></td>

			  <td>

						<img id="Slice_35" src="http://www.palmworkshops.org/images/background/Slice_35.gif" width="16" height="32" alt="" /></td>

					<td>

						<img id="Slice_36" src="http://www.palmworkshops.org/images/background/Slice_36.gif" width="24" height="32" alt="" /></td>

				</tr>

				<tr>

					<td width="24" style="background:url(http://www.palmworkshops.org/images/background/Slice_37.gif)">&nbsp;</td>

					<td width="16" style="background:url(http://www.palmworkshops.org/images/background/Slice_38.gif)">&nbsp;</td>

					<td width="610" align="left" valign="top" style="background:url([url]http://www.palmworkshops.org/images/background/Slice_39.gif[/url]) no-repeat"><!-- InstanceBeginEditable name="body" -->
<p>&nbsp;</p>
                    <table width="100%" border="0">
  <tr>
    <td align="center">                    
    
    <form enctype='multipart/form-data' action='http://palmworkshops.org/forms/use/contact/process.php' method='post'>
                    <table width="100%" border="0" align="left" cellpadding="10" cellspacing="0">
<tr>
                                <td height="30" width="182" align="right" valign="middle"><strong>Last Name:</strong></td>
                          <td align="left" height="30" colspan="2"><input type="text" name='last' size="25" />
                          <span class="required">*</span></td>
                              </tr>
                              <tr>
                                <td height="30" width="182" align="right" valign="middle"><strong>First Name:</strong></td>
                                <td align="left" height="30" colspan="2"><input type="text" name='first' size="25" />
                                <span class="required">*</span></td>
                              </tr>
                              <tr>
                                <td height="30" width="182" align="right" valign="middle"><strong>Address:</strong></td>
                                <td align="left" height="30" colspan="2"><input type="text" name='address' size="40" />
                                <span class="required">*</span></td>
                              </tr>
                              <tr>
                                <td height="30" width="182" align="right" valign="middle"><strong>City:</strong></td>
                                <td align="left" height="30" colspan="2"><input type="text" name='city' size="25" />
                                <span class="required">*</span></td>
                              </tr>
                              <tr>
                                <td height="30" width="182" align="right" valign="middle"><strong>State:</strong></td>
                                <td align="left" height="30" colspan="2"><input name='state' type="text" value="California" size="20" />
                                <span class="required">*</span></td>
                              </tr>
                              <tr>
                                <td height="30" width="182" align="right" valign="middle"><strong>Zip Code:</strong></td>
                                <td align="left" height="30" width="107"><input type="text" name='zip' size="7" />
                                <span class="required">*</span></td>
<td width="315"><table width="100%" border="0">
                                    <tr>
                                      <td width="44%" align="right" valign="middle"><strong>Phone #:</strong></td>
                                      <td width="56%" height="30" colspan="2" align="left"><input type="text" name='phone' size="17" /></td>
                              </tr>
                                </table></td>
                        </tr>
                              <tr>
                                <td width="182" height="30" align="right" valign="middle"><strong>Email:</strong></td>
                                <td align="left" height="30" colspan="2"><input type="text" name='email' size="30" /></td>
                              </tr>
                              <tr>
                                <td width="182" height="30" align="right" valign="top"><strong>Comments:</strong></td>
                                <td align="left" height="30" colspan="2"><textarea name='comments' rows="4" cols="33"></textarea></td>
                              </tr>
                              <tr>
                                <td colspan="4" height="25">
                                <p align="center">&nbsp;<br />
                                <input name="submit" type="submit" value='Submit Form' />
                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                <input name="reset" type="reset" value='Reset Form' />
                                </p></td>
                        </tr>
                            </table>
                    </form>

     </td>
  </tr>
</table>
					<!-- InstanceEndEditable -->

                    <p>&nbsp;</p>

                    <p align="center"><span class="bblue_12">Our Sponsors: 
                  Current and Past</span><br />
				      <span class="sponsors">Cornerstone of Southern California
					    <br />
					    Azure Acres, St. Helena Hospital-Center for Behavioral Health 
					    <br />
					    New Bridge Foundations, UFCW Local 5, The Camp Recovery Centers
					    <br />
					    New Bridge Foundations, NCADD-OC, NCADD, SFV, St Joseph Hospital-Orange County 
					    <br />
					    Cri-Help Inc. Sunrise House, Campobello CDRC, Pasadena Recovery Center
					    <br />
                  Twin Town Treatment Centers, Torrance Memorial Medical Center</span></p></td>

					<td width="16" style="background:url(http://www.palmworkshops.org/images/background/Slice_40.gif)">&nbsp;</td>

					<td width="8" bgcolor="#FFFFFF">&nbsp;</td>

					<td width="16" style="background:url(http://www.palmworkshops.org/images/background/Slice_42.gif)">&nbsp;</td>

					<td width="250" align="left" valign="top" style="background:url([url]http://www.palmworkshops.org/images/background/Slice_43.gif[/url]) no-repeat"><!-- InstanceBeginEditable name="column_side" -->2 1/2 hours of CEU's & PDH's when you attend one of our 2 monthly workshops for $10.00 per workshop.
					  <p>&nbsp;</p>
					  <p>&nbsp;</p>
					  <p class="subtitle">Educational Excellence</p>
			        <p>PALM is an excellent educational event that provides educational credits and promotes marketing and networking for your treatment facility.</p>
			        <p>&nbsp;</p>
			        <p>&nbsp;</p>
			        <p>&nbsp;</p>
			        <p>* If you would like to be added to our monthly mailer please <a href="http://www.palmworkshops.org/mailer.php" target="_self">click here</a> to fill out the form.</p>
					<!-- InstanceEndEditable --></td>

					<td width="16" style="background:url(http://www.palmworkshops.org/images/background/Slice_44.gif)">&nbsp;</td>

<td width="290" style="background:url(http://www.palmworkshops.org/images/background/Slice_45.gif)">&nbsp;</td>

		  </tr>

				<tr>

					<td>

						<img id="Slice_46" src="http://www.palmworkshops.org/images/background/Slice_46.gif" width="24" height="20" alt="" /></td>

					<td>

						<img id="Slice_47" src="http://www.palmworkshops.org/images/background/Slice_47.gif" width="16" height="20" alt="" /></td>

					<td>

						<img id="Slice_48" src="http://www.palmworkshops.org/images/background/Slice_48.gif" width="610" height="20" alt="" /></td>

					<td>

						<img id="Slice_49" src="http://www.palmworkshops.org/images/background/Slice_49.gif" width="16" height="20" alt="" /></td>

					<td>

						<img id="Slice_50" src="http://www.palmworkshops.org/images/background/Slice_50.gif" width="8" height="20" alt="" /></td>

					<td>

						<img id="Slice_51" src="http://www.palmworkshops.org/images/background/Slice_51.gif" width="16" height="20" alt="" /></td>

					<td>

						<img id="Slice_52" src="http://www.palmworkshops.org/images/background/Slice_52.gif" width="250" height="20" alt="" /></td>

					<td>

						<img id="Slice_53" src="http://www.palmworkshops.org/images/background/Slice_53.gif" width="16" height="20" alt="" /></td>

					<td>

						<img id="Slice_54" src="http://www.palmworkshops.org/images/background/Slice_54.gif" width="24" height="20" alt="" /></td>

				</tr>

			</table></td>

	</tr>

	<tr>

		<td>

        

<!-- Footer -->                

			<table id="footer" width="980" border="0" cellpadding="0" cellspacing="0">

				<tr>

					<td>

						<img id="Slice_55" src="http://www.palmworkshops.org/images/background/Slice_55.gif" width="24" height="30" alt="" /></td>

					<td width="932" align="center" valign="top" bgcolor="#FFFFFF" class="footerlinks">

                    <a href="http://www.palmworkshops.org/index.php" target="_self" title="Home - CEU's & PDH's - Palm Workshops - Online Exams - Palmworkshops.org">Home</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

                    <a href="http://www.palmworkshops.org/about.php" target="_self" title="About - CEU's & PDH's - Palm Workshops - Online Exams - Palmworkshops.org">About</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

                    <a href="http://www.palmworkshops.org/calendar.php" target="_self" title="Calendar - CEU's & PDH's - Palm Workshops - Online Exams - Palmworkshops.org">Calendar</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://www.palmworkshops.org/workshops.php" target="_self" title="Testimonials - CEU's &amp; PDH's - Palm Workshops - Online Exams - Palmworkshops.org">Workshops</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

                    <a href="http://www.palmworkshops.org/testimonials.php" target="_self" title="Testimonials - CEU's & PDH's - Palm Workshops - Online Exams - Palmworkshops.org">Testimonials</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

                    <a href="http://www.palmworkshops.org/directions.php" target="_self" title="Directions - CEU's & PDH's - Palm Workshops - Online Exams - Palmworkshops.org">Directions</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

                    <a href="http://www.palmworkshops.org/terms.php" target="_self" title="Terms & Conditions - CEU's & PDH's - Palm Workshops - Online Exams - Palmworkshops.org">Terms &amp; Conditions</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

                    <a href="http://www.palmworkshops.org/sitemap.php" target="_self" title="Site Map - CEU's & PDH's - Palm Workshops - Online Exams - Palmworkshops.org">Site Map</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

                    <a href="http://www.palmworkshops.org/contact.php" target="_self" title="Contact - CEU's & PDH's - Palm Workshops - Online Exams - Palmworkshops.org">Contact</a></td>

<td>

						<img id="Slice_57" src="http://www.palmworkshops.org/images/background/Slice_57.gif" width="24" height="30" alt="" /></td>

				</tr>

				<tr>

					<td>

						<img id="Slice_58" src="http://www.palmworkshops.org/images/background/Slice_58.gif" width="24" height="20" alt="" /></td>

					<td>

						<img id="Slice_59" src="http://www.palmworkshops.org/images/background/Slice_59.gif" width="932" height="20" alt="" /></td>

					<td>

						<img id="Slice_60" src="http://www.palmworkshops.org/images/background/Slice_60.gif" width="24" height="20" alt="" /></td>

				</tr>

			</table></td>

	</tr>

</table>

<span class="copyright">Copyright &copy; 2008, Palmworkshops.org</span><br />


</div>

</body>

<!-- InstanceEnd --></html>
Quote:
Originally Posted by NullPointer View Post
Can't tell you much other than that your form validation code appears to not be working.

You're going to have to post your code if you want a better answer.

Last edited by lsinger9404; 04-11-2010 at 02:03 AM..
lsinger9404 is offline
Reply With Quote
View Public Profile
 
Old 04-09-2010, 01:41 AM Re: Novice designer needs help with adopted site
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
Two things:

When you post code (and especially when you post that much) you should use code or php tags.

The code you posted is the HTML generated by contact.php. What I need to see is the PHP code (that is the actual code, not the HTML it generates) in process.php
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is online now
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 04-11-2010, 01:38 AM Re: Novice designer needs help with adopted site
Novice Talker

Posts: 8
Trades: 0
Quote:
Originally Posted by NullPointer View Post
Two things:

When you post code (and especially when you post that much) you should use code or php tags.

The code you posted is the HTML generated by contact.php. What I need to see is the PHP code (that is the actual code, not the HTML it generates) in process.php
Sorry...Like I said..I'm a novice.

I'm not quite understanding what you mean...do you mean this:
PHP Code:
<?php
include("global.inc.php");
$errors=0;
$error="The following errors occured while processing your form input.<ul>";
pt_register('POST','last');
pt_register('POST','first');
pt_register('POST','address');
pt_register('POST','city');
pt_register('POST','state');
pt_register('POST','zip');
pt_register('POST','phone');
pt_register('POST','email');
pt_register('POST','comments');
$comments=preg_replace("/(\015\012)|(\015)|(\012)/","&nbsp;<br />"$comments);if($last=="" || $first=="" || $address=="" || $city=="" || $state=="" || $zip=="" ){
$errors=1;
$error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
}
if(!
eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)){
$error.="<li>Invalid email address entered";
$errors=1;
}
if(
$errors==1) echo $error;
else{
$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="
The following message was sent to you directly from the Contact Form on [url]www.palmworkshops.org[/url]. If you wish to reply to this, please reply using the contact info they provided. DO NOT reply to this email directly by clicking reply. To reply via email, create a new email and type in their email address manually, or simply call them with the phone numbers they provided.

- Larry Singer
Webasite Designer


*
* * * * * * * *

Last Name: "
.$last."

First Name: "
.$first."

Address: "
.$address."

City: "
.$city."

State: "
.$state."

Zip Code: "
.$zip."

Phone Number: "
.$phone."

Email: "
.$email."


Comments:
      "
.$comments."

* * * * * * * *
*      
"
;
$message stripslashes($message);
mail("palmeap@aol.com","Form Submitted at palmworkshops.org",$message,"From:palmeap@aol.com");

header("Refresh: 0;url=http://palmworkshops.org/thankyou.html");
?><?php 
}
?>

Last edited by lsinger9404; 04-11-2010 at 01:59 AM..
lsinger9404 is offline
Reply With Quote
View Public Profile
 
Old 04-11-2010, 01:40 AM Re: Novice designer needs help with adopted site
Novice Talker

Posts: 8
Trades: 0
Hmmmm..I don't know where that pink smilie face came from on the bottom

Last edited by lsinger9404; 04-11-2010 at 02:01 AM..
lsinger9404 is offline
Reply With Quote
View Public Profile
 
Old 04-11-2010, 02:00 AM Re: Novice designer needs help with adopted site
Novice Talker

Posts: 8
Trades: 0
ah ha! I see how to post!
lsinger9404 is offline
Reply With Quote
View Public Profile
 
Old 04-11-2010, 03:13 AM Re: Novice designer needs help with adopted site
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
The problem appears to be that the variables from POST are not being set correctly most likely because the function pt_register isn't doing its job.

The quickest solution would probably be just to do away with pt_register altogether (it looks to me like it is a replacement for register globals, which was deprecated). Since you are just sending this data in an email you can probably get by without doing any sanitizing, other than checking that the data has been entered.

PHP Code:
<?php
include("global.inc.php");
$errors=0;
$error="The following errors occured while processing your form input.<ul>";
$comments=preg_replace("/(\015\012)|(\015)|(\012)/","&nbsp;<br />"$_POST['comments']);
if(
$_POST['last']=="" || $_POST['first'=="" || $_POST['address']=="" || $_POST['city']=="" || $_POST['state']=="" || $_POST['zip']=="" ){
$errors=1;
$error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
}
if(!
preg_match("/^[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\\.[a-z]{2,}$/i",$_POST['email'])){{
$error.="<li>Invalid email address entered";
$errors=1;
}
if(
$errors==1) echo $error;
else{
$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="
The following message was sent to you directly from the Contact Form on [url]www.palmworkshops.org[/url]. If you wish to reply to this, please reply using the contact info they provided. DO NOT reply to this email directly by clicking reply. To reply via email, create a new email and type in their email address manually, or simply call them with the phone numbers they provided.

- Larry Singer
Webasite Designer


*
* * * * * * * *

Last Name: "
.$_POST['last']."

First Name: "
.$_POST['first']."

Address: "
.$_POST['address']."

City: "
.$_POST['city']."

State: "
.$_POST['state']."

Zip Code: "
.$_POST['zip']."

Phone Number: "
.$_POST['phone']."

Email: "
.$_POST['email']."


Comments:
      "
.$_POST['comments']."

* * * * * * * *
*      
"
;
$message stripslashes($message);
mail("palmeap@aol.com","Form Submitted at palmworkshops.org",$message,"From:palmeap@aol.com");

header("Refresh: 0;url=http://palmworkshops.org/thankyou.html");
}
?>
Also, I noticed that you were using an ereg regular expression. The ereg family of functions are deprecated and will be removed so I replaced it with an equivalent preg expression.

By the way, in my opinion, judging from this code, your friend's designer isn't quite ready to be charging money for his services. The code could use some cleaning up; if not a complete overhaul.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by NullPointer; 04-11-2010 at 03:15 AM..
NullPointer is online now
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 04-19-2010, 06:56 PM Re: Novice designer needs help with adopted site
Novice Talker

Posts: 8
Trades: 0
Wow..Thanks for your help. I inserted your code and it seemed to initially work, but then I ended up getting this error:
Parse error: syntax error, unexpected ')', expecting ']' in /home/content/81/5572781/html/forms/use/contact/process.php on line 6

So then I looked at at line and found there were some spaces and a missing bracket.

I made the corrections and am now uploading and I will see what happens.

You suggested going through and cleaning up the code. Your tag line is "will code for food". Any chance you could name a price to go through and clean it up? I'll let my friend know and if he feels it is worth it, you will get some money to buy food.
Let me know.

Larry

Quote:
Originally Posted by NullPointer View Post
The problem appears to be that the variables from POST are not being set correctly most likely because the function pt_register isn't doing its job.

The quickest solution would probably be just to do away with pt_register altogether (it looks to me like it is a replacement for register globals, which was deprecated). Since you are just sending this data in an email you can probably get by without doing any sanitizing, other than checking that the data has been entered.

PHP Code:
<?php
include("global.inc.php");
$errors=0;
$error="The following errors occured while processing your form input.<ul>";
$comments=preg_replace("/(\015\012)|(\015)|(\012)/","&nbsp;<br />"$_POST['comments']);
if(
$_POST['last']=="" || $_POST['first'=="" || $_POST['address']=="" || $_POST['city']=="" || $_POST['state']=="" || $_POST['zip']=="" ){
$errors=1;
$error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
}
if(!
preg_match("/^[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\\.[a-z]{2,}$/i",$_POST['email'])){{
$error.="<li>Invalid email address entered";
$errors=1;
}
if(
$errors==1) echo $error;
else{
$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="
The following message was sent to you directly from the Contact Form on [url]www.palmworkshops.org[/url]. If you wish to reply to this, please reply using the contact info they provided. DO NOT reply to this email directly by clicking reply. To reply via email, create a new email and type in their email address manually, or simply call them with the phone numbers they provided.

- Larry Singer
Webasite Designer


*
* * * * * * * *

Last Name: "
.$_POST['last']."

First Name: "
.$_POST['first']."

Address: "
.$_POST['address']."

City: "
.$_POST['city']."

State: "
.$_POST['state']."

Zip Code: "
.$_POST['zip']."

Phone Number: "
.$_POST['phone']."

Email: "
.$_POST['email']."


Comments:
      "
.$_POST['comments']."

* * * * * * * *
*      
"
;
$message stripslashes($message);
mail("palmeap@aol.com","Form Submitted at palmworkshops.org",$message,"From:palmeap@aol.com");

header("Refresh: 0;url=http://palmworkshops.org/thankyou.html");
}
?>
Also, I noticed that you were using an ereg regular expression. The ereg family of functions are deprecated and will be removed so I replaced it with an equivalent preg expression.

By the way, in my opinion, judging from this code, your friend's designer isn't quite ready to be charging money for his services. The code could use some cleaning up; if not a complete overhaul.
lsinger9404 is offline
Reply With Quote
View Public Profile
 
Old 04-19-2010, 07:09 PM Re: Novice designer needs help with adopted site
Novice Talker

Posts: 8
Trades: 0
Well..that error was eradicated, but now I get this:
"Parse error: syntax error, unexpected $end in /home/content/81/5572781/html/forms/use/contact/process.php on line 55"

and I am lost.

Quote:
Originally Posted by lsinger9404 View Post
Wow..Thanks for your help. I inserted your code and it seemed to initially work, but then I ended up getting this error:
Parse error: syntax error, unexpected ')', expecting ']' in /home/content/81/5572781/html/forms/use/contact/process.php on line 6

So then I looked at at line and found there were some spaces and a missing bracket.

I made the corrections and am now uploading and I will see what happens.

You suggested going through and cleaning up the code. Your tag line is "will code for food". Any chance you could name a price to go through and clean it up? I'll let my friend know and if he feels it is worth it, you will get some money to buy food.
Let me know.

Larry

Last edited by lsinger9404; 04-19-2010 at 07:10 PM..
lsinger9404 is offline
Reply With Quote
View Public Profile
 
Old 04-19-2010, 08:03 PM Re: Novice designer needs help with adopted site
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
Looks like you have an extra opening bracket on line 10:
PHP Code:
if(!preg_match("/^[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\\.[a-z]{2,}$/i",$_POST['email'])){{ 
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is online now
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 04-21-2010, 03:42 AM Re: Novice designer needs help with adopted site
Novice Talker

Posts: 8
Trades: 0
SUCCESS!! Thank you so much. It is up and running.

Please answer about my proposition.

I am in Irvine as well.

Larry

Quote:
Originally Posted by NullPointer View Post
Looks like you have an extra opening bracket on line 10:
PHP Code:
if(!preg_match("/^[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\\.[a-z]{2,}$/i",$_POST['email'])){{ 
lsinger9404 is offline
Reply With Quote
View Public Profile
 
Old 04-21-2010, 04:19 AM Re: Novice designer needs help with adopted site
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
Quote:
Originally Posted by lsinger9404 View Post
Please answer about my proposition.

I am in Irvine as well.
Send me a PM or email (contact info on my blog). I'll need more details before I can quote you.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is online now
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Reply     « Reply to Novice designer needs help with adopted site
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.45431 seconds with 12 queries