|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Hi everyone! This is pretty funny or sad LOL
For checkboxes in forms I used variable variables to process the info! Like: checkbox name = steve, value = yes Then I compare the checkbox name to the names in my database. HAHAHA that's pretty dumb of me. Code:
while ($row = mysql_fetch_array($result)) {
$name = $row['name'];
if (isset($$name) && $$name = 'yes') {
array_push($array, '$name');
//etc...
All I need to do is name my checkboxes so it will form an array and very much easy to process later on LOL Oh well live and learn I guess! I notice many dumb things I did but at least I notice them and change them. I wonder if other people did stupid errors like this when they started out?Just because it works doesn't mean it's okay to live with! On a side note do you think a PHP bloopers web site would be cool? I mean chunks of poorly written code along side with the proper way of doing things with a small explaination.. Could help people like me, when reading such a site and realize that some of my techniques are wrong. Only to change them into proper style and function? You could search the site by functions etc... I'd build such a thing but I could only supply the wrong techniques LOL...
__________________
Going PHP5 OOP nerd and maybe get some Zend training too... |
|
#2
|
||||
|
||||
|
I can help you in one matter.
I can provide you the correct code, cause it would be now hard for me to write blooper !!! not boasting about myself..but still.... JD
__________________
_____________________________ d.k.jariwala (JD) ~ simple thought, simple act ~ I blog @ http://jdk.phpkid.org |
|
#3
|
|||
|
|||
|
Yeah, it may be a fun little site but I will only have time until March, until then I'm booked
![]() In the mean time I'm reading alot of examples from the good coders such as you, jdk and others from these boards and taking apart cool scripts like phpmyadmin, etc... |
![]() |
| Viewing: Dev Shed Forums > Other > Dev Shed Lounge > crap how stupid of me (checkboxes) not a ? [rant] |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|