Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old August 7th, 2000, 11:42 AM
Loki Loki is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: Norman, OK, USA
Posts: 12 Loki User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Loki
Hey all,

Quick question.

I've got a generic form a person can fill out. After they fill it out, the user has the option of coming back and editing various things, address, email, and which subscriptions they would like to receive.

so here's the problem: when they come back to edit there information they can use check boxes to subscribe/unsubscribe. Which looks like this:
<input type=checkbox name=news1 value="$user[10]"

where $user[10] is it's placement in the mysql table. Now how do I get part to work?
I'm sort of lost, wanting them to be able to add a list (value of 1) and delete it (NULL value).


Thank you in advance for the help.

Reply With Quote
  #2  
Old August 7th, 2000, 12:42 PM
JonLed JonLed is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Aug 2000
Location: Indiana
Posts: 614 JonLed User rank is Corporal (100 - 500 Reputation Level)JonLed User rank is Corporal (100 - 500 Reputation Level)JonLed User rank is Corporal (100 - 500 Reputation Level)JonLed User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 h 49 m 49 sec
Reputation Power: 9
I'm not quit sure what you're asking, but I'll give it a shot.
######
if($user[10] eq "1") {
<input type=checkbox name=news1 value="1" checked>
} else {
<input type=checkbox name=news1 value="1">
}#end if.
###Of course you'd have to put those in print statements.

Then when the info comes back to the script:
####
if($FORM{news1} eq "1"){$user[10]=1} else {$user[10]=0;}## or whatever you want them to equal.
####
$FORM{news1} is the checkbox's parsed value.

Is this what you wanted?

Reply With Quote
  #3  
Old August 7th, 2000, 03:08 PM
Loki Loki is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: Norman, OK, USA
Posts: 12 Loki User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Loki
Oh yes. That worked out great!
Thanks.


<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by Loki:
Hey all,

Quick question.

I've got a generic form a person can fill out. After they fill it out, the user has the option of coming back and editing various things, address, email, and which subscriptions they would like to receive.

so here's the problem: when they come back to edit there information they can use check boxes to subscribe/unsubscribe. Which looks like this:
<input type=checkbox name=news1 value="$user[10]"

where $user[10] is it's placement in the mysql table. Now how do I get part to work?
I'm sort of lost, wanting them to be able to add a list (value of 1) and delete it (NULL value).


Thank you in advance for the help.
[/quote]


Reply With Quote
  #4  
Old August 7th, 2000, 03:26 PM
JonLed JonLed is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Aug 2000
Location: Indiana
Posts: 614 JonLed User rank is Corporal (100 - 500 Reputation Level)JonLed User rank is Corporal (100 - 500 Reputation Level)JonLed User rank is Corporal (100 - 500 Reputation Level)JonLed User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 h 49 m 49 sec
Reputation Power: 9
N/P

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > input value, checkbox, form, and mysql


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway