Jump to content


Photo

can u fix this 1?


  • Please log in to reply
1 reply to this topic

#1 bouter2005

bouter2005
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 11 June 2006 - 06:46 PM

[img src=\"style_emoticons/[#EMO_DIR#]/laugh.gif\" style=\"vertical-align:middle\" emoid=\":laugh:\" border=\"0\" alt=\"laugh.gif\" /] I adapted a php mail form and it works fine except when one or more required fields are missing; then the supposed error alerts do not work. somebody expert enough, please, advise.

this is part of the form:


<td valign="top"><b>Payment:*</b> <p>
<input type="radio" name="payment" [] value="<? echo $payment; ?> US $468.62--complete course">I pay US $468.62 at once for guidance and correction of homework over a period of 2 years.
</p>

<p><input type="radio" name="payment" [] value="US $501.90"--3 installments>I prefer the three consecutive payments of
US $167.30 for a total of US $501.90.</p>

<p><input type="radio" name="payment" [] value="US $312.45--web access & correction">I prefer web access plus correction of homework for US $312.45.</p>

<p><input type="radio" name="payment" [] value="US $343.19 -- cdrom">I prefer the cd-rom plus correction of homework for US $343.19.</p>

<p><input type="radio" name="payment" [] value="just course in ringbinder US $156.17">
Just the course in the ringbinder for US $156.17.</P>

<p><input type="radio" name="payment" [] value="just course US $118.38, cdrom">
Just the cd-rom for US $118.38.</P>

<p><input type="radio" name="payment" [] value="just web access, US $87.64">
Just web access for US $87.64.</P>

<p><input type="radio" name="payment" [] value="all rights and media, US $594.33">
All rights and media for US $594.33.</P>

I understand that if I purchase only the course and/or access to it, I can always pay later for
guidance and correction. *</p>


</td>

this is where the errors seem to be:

<?
if(!empty($_POST)) extract($_POST);
if (empty($participation)) $error .= "You didn't check participation<br>";
if (empty($payment)) $error .= "You didn't choose payment<br>";
if (empty($how)) $error .= "You didn't indicate method of payment<br>";
if (empty($email)) $error .= "You didn't enter your email address<br>";
if (empty($name)) $error .= "You didn't include your name<br>";


these are links to the 2 necessary documents, temporarily given as .txt files:

[a href=\"http://www.ntgreek.eu/pdf/salecourse.txt\" target=\"_blank\"]http://www.ntgreek.eu/pdf/salecourse.txt[/a]

[a href=\"http://www.ntgreek.eu/pdf/feedback1a.txt\" target=\"_blank\"]http://www.ntgreek.eu/pdf/feedback1a.txt[/a]

you should be able to analyze them in source

thanx

#2 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 11 June 2006 - 06:51 PM

Umm... yeah, suprisingly enough with the name change, people still post PHP questions here. WTF?

Thread Moved.

Info: PHP Manual





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users