Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

   

Reply
 
LinkBack Thread Tools Display Modes
Old 05-18-2006, 02:19 PM   #1 (permalink)
Contributing Member
 
Join Date: 07-30-05
Posts: 285
iTrader: 0 / 0%
Latest Blog:
None

Radnor is just really niceRadnor is just really niceRadnor is just really niceRadnor is just really niceRadnor is just really niceRadnor is just really niceRadnor is just really niceRadnor is just really niceRadnor is just really niceRadnor is just really niceRadnor is just really nice
Question PHP issues.....

Hello to all!

What I would like to do..... I have a form with several text boxes and several checkboxes on it. I'd like to pass BOTH the textbox and checkbox values to a PHP script. If there is an error, I would like to fill in the form with the original data keyed in.

What I am doing is.... I've started a session. Display the form. When submit clicked, validate data....

I can get the text fields to display on the form if there is an error, I do not seem to be passing the status of a check box(s).....

Can you pass from a form to PHP the state of a check box????


TIA!!!
Radnor is offline  
Add Post to del.icio.us
Reply With Quote
Old 05-18-2006, 05:09 PM   #2 (permalink)
Potato Monster
 
Immo's Avatar
 
Join Date: 03-26-04
Location: Chester, England
Posts: 3,874
iTrader: 0 / 0%
Immo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest order
Send a message via ICQ to Immo Send a message via AIM to Immo Send a message via MSN to Immo Send a message via Yahoo to Immo Send a message via Skype™ to Immo
<input name="checkbox" type="checkbox" value="checkbox" <?php if ($checkboxname) != "") { echo ?>checked="checked"<?php } ?>/>
__________________
I have become death, destroyer of worlds.
Immo is offline  
Add Post to del.icio.us
Reply With Quote
Old 05-19-2006, 06:51 AM   #3 (permalink)
Contributing Member
 
Join Date: 07-30-05
Posts: 285
iTrader: 0 / 0%
Latest Blog:
None

Radnor is just really niceRadnor is just really niceRadnor is just really niceRadnor is just really niceRadnor is just really niceRadnor is just really niceRadnor is just really niceRadnor is just really niceRadnor is just really niceRadnor is just really niceRadnor is just really nice
getting the following error:

"Parse error: syntax error, unexpected T_IS_NOT_EQUAL"
Radnor is offline  
Add Post to del.icio.us
Reply With Quote
Old 05-19-2006, 06:55 AM   #4 (permalink)
Potato Monster
 
Immo's Avatar
 
Join Date: 03-26-04
Location: Chester, England
Posts: 3,874
iTrader: 0 / 0%
Immo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest order
Send a message via ICQ to Immo Send a message via AIM to Immo Send a message via MSN to Immo Send a message via Yahoo to Immo Send a message via Skype™ to Immo
<?php if ($checkboxname) != "") { echo ?>checked="checked"<?php ; } ?>/>

Sorry my bad...
__________________
I have become death, destroyer of worlds.
Immo is offline  
Add Post to del.icio.us
Reply With Quote
Old 05-19-2006, 07:17 AM   #5 (permalink)
Contributing Member
 
Join Date: 07-30-05
Posts: 285
iTrader: 0 / 0%
Latest Blog:
None

Radnor is just really niceRadnor is just really niceRadnor is just really niceRadnor is just really niceRadnor is just really niceRadnor is just really niceRadnor is just really niceRadnor is just really niceRadnor is just really niceRadnor is just really niceRadnor is just really nice
This line is between the form tags

Code:
<input name="checkbox" type="checkbox" value="checkbox" <?php if ($checkboxname) != "") { echo ?>checked="checked"<?php ; } ?>/>
same error
Radnor is offline  
Add Post to del.icio.us
Reply With Quote
Old 05-19-2006, 11:31 AM   #6 (permalink)
Potato Monster
 
Immo's Avatar
 
Join Date: 03-26-04
Location: Chester, England
Posts: 3,874
iTrader: 0 / 0%
Immo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest order
Send a message via ICQ to Immo Send a message via AIM to Immo Send a message via MSN to Immo Send a message via Yahoo to Immo Send a message via Skype™ to Immo
Oh sorry lol, take the bracket off the end of $checkboxname

<?php if ($checkbox != "") { echo ?>checked="checked"<?php ; } ?>
__________________
I have become death, destroyer of worlds.
Immo is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Signature Issues marc_gfx V7N Forum Support 6 06-15-2007 04:02 AM
CSS issues wulf2001 Coding Forum 8 07-28-2006 12:54 AM
CSS issues Hugenerd Coding Forum 2 02-21-2006 07:46 PM
DNS Issues? Kelleque Dedicated Servers 3 02-03-2006 08:52 PM


Sponsor Links
Webmaster Forum Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 03:38 AM.
© Copyright 2008 V7 Inc