Forum Moderators: coopster

Message Too Old, No Replies

radio button problem

         

MsCrow

10:45 pm on Sep 11, 2006 (gmt 0)

10+ Year Member



Hello

Thanks to those who've helped me before. I'm stuck on another form, it looks fine to me but it just produces a blank screen on submit and I can't see why.

Here's part of my form code which is replicated and attribute1 changed to attribute2 etc:

<tr>
<td><p>Ability to communicate effectively with people in a work environment</p></td>
<td><p>
<label>
<input name="attribute1" type="radio" value="yes" checked="checked" />
yes</label>
<br />
<label>
<input name="attribute1" type="radio" value="no" checked="checked" />
no</label>
<br />
</p></td>
<td>&nbsp;</td>
</tr>

Here's the php which goes to make an fpdf document:

$pdf->Multicell(0,5,'These are the employability skills that you already possess'.$i,0,1);
$pdf->Ln(5);
if $attribute1 == "yes" $pdf->Multicell(0,5,$_POST["Ability to communicate effectively with people in a work environment"],0,1);
$pdf->Ln(5);
if $attribute2 == "yes" $pdf->Multicell(0,5,$_POST["Communicate your own ideas to individuals"],0,1);
$pdf->Ln(5);
$pdf->Multicell(0,5,'Here is the list of the skills that you would like to improve'.$i,0,1);
$pdf->Ln(5);
if $attribute1 == "no" $pdf->Multicell(0,5,$_POST["Ability to communicate effectively with people in a work environment"],0,1);
$pdf->Ln(5);
if $attribute2 == "no" $pdf->Multicell(0,5,$_POST["Communicate your own ideas to individuals"],0,1);
$pdf->Ln(5);

Can anyone advise?

[edited by: MsCrow at 10:47 pm (utc) on Sep. 11, 2006]

orion_rus

5:02 am on Sep 12, 2006 (gmt 0)

10+ Year Member



you need to change $_POST[COMMENTS] to $_POST[NAMES]
like
$_POST["Ability to communicate effectively with people in a work environment"] change to ->
$_POST["attribute1"] and u'll get here yes or no value due to user select

MsCrow

2:14 pm on Sep 12, 2006 (gmt 0)

10+ Year Member



Hello

I changed it to:
if $attribute1 == "yes" $pdf->Multicell(0,5,$_POST["attribute1"],0,1);

But I still get a blank page :-(

orion_rus

10:46 am on Sep 13, 2006 (gmt 0)

10+ Year Member



it's due of errors try to cut script by half and start it again

i think it's simply not working script because it just a part of a code

omoutop

11:32 am on Sep 13, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



before the creation of your pdf, try to echo your vars to check what you are posting, something like:

[php]
echo "<pre>";
print_r($_POST);
echo "</pre>";
[/php]

try to use error_reporting(E_ALL) to see the errors

Check your (') versus (")

make sure the $_POST['variable'] don;t mess with your php code (some weird characters, html code, etc)