Re: [PHP-DB] radio form submission

2011-06-23 Thread Daniel P. Brown
On Thu, Jun 23, 2011 at 14:18, Chris Stinemetz wrote: > So far I am good on creating the form and  submitting it to mysql > database and calling the submitting value from a different script. > > My question is: How can I make it so when a user selects radio option > value "1" it will then be displ

Re: [PHP-DB] radio form submission

2011-06-23 Thread Daniel P. Brown
On Thu, Jun 23, 2011 at 16:08, Chris Stinemetz wrote: > > I must be missing something. I am just getting a blank page. Your help > is greatly apprecieated. This is why you're supposed to take the advice and write it out yourself, not copy and paste the code. ;-P By copying and pasting t

[PHP-DB] Re: radio form submission

2011-06-23 Thread Jim Giner
If you put the "0-250kbps" as the value= of your html tag, php would give you that when you did this: $rb_picked = $_POST['post_tptest']. No need for a switch or anything to re-interpret what the user picked. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://

Re: [PHP-DB] radio form submission

2011-06-23 Thread Tamara Temple
On Jun 23, 2011, at 2:32 PM, Karl DeSaulniers wrote: Try this... function getSpeed($val) { if($val != 'undefined') { switch ($val){ case "1": $post_tptest = "0-250kbps"; break;

[PHP-DB] Re: radio form submission

2011-06-23 Thread Jim Giner
Try reading a good html reference on how radio buttons work. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] radio form submission

2011-06-23 Thread Chris Stinemetz
> >    Use an if or a switch.  For example: > I think your suggestions are exactly what I am looking for. I am not sure exactly where to place it. Do I insert it after the query statment? Thank you, Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.n

Re: [PHP-DB] radio form submission

2011-06-23 Thread Daniel P. Brown
On Thu, Jun 23, 2011 at 15:46, Chris Stinemetz wrote: >> >>    Use an if or a switch.  For example: >> > > I think your suggestions are exactly what I am looking for. I am not > sure exactly where to place it. Do I insert it after the query > statment? During your while() loop. This line her

Re: [PHP-DB] radio form submission

2011-06-23 Thread Karl DeSaulniers
I also think you need to use the mysql_free_result like so.. echo ''; while($row = mysql_fetch_assoc($result)) { echo '' . $row['mar_name'] . ''; mysql_f

Re: [PHP-DB] radio form submission

2011-06-23 Thread Chris Stinemetz
On Thu, Jun 23, 2011 at 2:49 PM, Daniel P. Brown wrote: > On Thu, Jun 23, 2011 at 15:46, Chris Stinemetz > wrote: >>> >>>    Use an if or a switch.  For example: >>> >> >> I think your suggestions are exactly what I am looking for. I am not >> sure exactly where to place it. Do I insert it after

Re: [PHP-DB] radio form submission

2011-06-23 Thread Karl DeSaulniers
Try this... function getSpeed($val) { if($val != 'undefined') { switch ($val){ case "1": $post_tptest = "0-250kbps"; break; case "2":

[PHP-DB] radio form submission

2011-06-23 Thread Chris Stinemetz
So far I am good on creating the form and submitting it to mysql database and calling the submitting value from a different script. My question is: How can I make it so when a user selects radio option value "1" it will then be displayed as 0-250kbps when I call it the value in the bottom script?

[PHP-DB] Re: mysql COUNT row results

2011-06-23 Thread Jim Giner
If you're looking for a count of ALL records, why do you want to append that to EACH record? Now if you're looking for a count of subscribers who have certain attributes (ie, unique groups of subscribers), then you would use a group by clause and include the attributes that define the group in

[PHP-DB] Re: mysql COUNT row results

2011-06-23 Thread Ron Piggott
-Original Message- From: Geoff Lane Sent: Thursday, June 23, 2011 2:15 AM To: Ron Piggott Cc: [email protected] Subject: Re: mysql COUNT row results Hi Ron, On Thursday, June 23, 2011, 6:14:38 AM, you wrote: Is there a way that SELECT COUNT(auto_increment) as total_subscribers