Jump to content

Recommended Posts

Please help

I am stuck on how to click checkbox and put area code in text field

 

<?php $array1 = array("(516)","(631)","(718)"); ?>

<td><input name="Phone" type="text" value="<?php echo $array1; ?>" size="15" />

<input name="RadioGroup1" type="radio" id="RadioGroup1_0" onclick="<?php echo $array[0]; ?>" value="" checked="checked" />

<label>(516)</label>

<input name="RadioGroup1" type="radio" id="RadioGroup1_1" onclick="<?php echo $array[1]; ?>" value="" />

<label>(631)</label>

<input name="RadioGroup1" type="radio" id="RadioGroup1_2" onclick="<?php echo $array[2]; ?>" value="" />

<label>(718)</label><br />

<label>(###)###-####</label>

</td>

Link to comment
https://forums.phpfreaks.com/topic/130263-array-help/
Share on other sites

As above... You can't onclick="<?php echo bla bla ?>"

 

onclick is reserved for javascript functions or such like.....

 

Also your trying to echo an array... On a normal config this will not work... you'll need to manipulate the array with something like foreach() or print_r().

 

Explain exactly what it is your trying to accomplish!?

Link to comment
https://forums.phpfreaks.com/topic/130263-array-help/#findComment-676492
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.