Search found 25 matches

by jeremybass
Sun Jan 20, 2008 7:24 pm
Forum: PHP - Code
Topic: is ELSE the right choice?
Replies: 20
Views: 998

Re: is ELSE the right choice?

Now i got it.... but i had to add a check box the was none so one would have to select None to have none... with a valadation script i think this is close enough... an ideas on it are welcomed... thank for all the help... foreach ($HTTP_POST_VARS['mark'] as $key=>$val) {        $sql_data_array = arr...
by jeremybass
Sun Jan 20, 2008 7:04 pm
Forum: PHP - Code
Topic: is ELSE the right choice?
Replies: 20
Views: 998

Re: is ELSE the right choice?

damn i got all excited for nothing... now it just does one or the other... i think i'm on the right path...
by jeremybass
Sun Jan 20, 2008 6:53 pm
Forum: PHP - Code
Topic: is ELSE the right choice?
Replies: 20
Views: 998

Re: is ELSE the right choice?

yep i'm cystal clear... check it out... foreach ($HTTP_POST_VARS['mark'] as $key=>$val) {             $sql_data_array = array('products_id' => tep_db_prepare_input($val['products_id']), 'extra_fields_type_id' => 'extra_fields_type_id');       tep_db_query("INSERT INTO " . TABLE_PRODUCTS_TO...
by jeremybass
Sun Jan 20, 2008 6:49 pm
Forum: PHP - Code
Topic: is ELSE the right choice?
Replies: 20
Views: 998

Re: is ELSE the right choice?

i think i'm clear, is i can't dirtecly tell if it's not checked... i must tell by way off what is checked?
by jeremybass
Sun Jan 20, 2008 6:04 pm
Forum: PHP - Code
Topic: is ELSE the right choice?
Replies: 20
Views: 998

Re: is ELSE the right choice?

would anybody know if i'm on the right track now... i was total over looking the == thing again ... i though i fixed that after it was pointed out lol... oh well here is the lastest foreach ($HTTP_POST_VARS['mark'] as $key=>$val) { $check_msg = "Checked: $val\n";  if ($check_msg = $val) { ...
by jeremybass
Sun Jan 20, 2008 5:10 pm
Forum: PHP - Code
Topic: is ELSE the right choice?
Replies: 20
Views: 998

Re: is ELSE the right choice?

ok so trying to address what you said this is the route i'v been trying... it's not working but i think it's a little closer... foreach ($HTTP_POST_VARS['mark'] as $key=>$val) { $checked =  "Checked:  $key=>$val\n";  if ($checked ==  true) {          $sql_data_array = array('products_id' =...
by jeremybass
Sun Jan 20, 2008 4:35 pm
Forum: PHP - Code
Topic: is ELSE the right choice?
Replies: 20
Views: 998

Re: is ELSE the right choice?

well i i was thinking the html input for a checkbox is 'checked' so i could use that to say if it is there then it'd insert other wise it'd delete... am i way off?
by jeremybass
Sun Jan 20, 2008 4:19 pm
Forum: PHP - Code
Topic: is ELSE the right choice?
Replies: 20
Views: 998

Re: is ELSE the right choice?

May-be my question should be how write a true false statement for a a cheack box as it's being posted... try putting $HTTP_POST_VARS around checked no luck... i know i'm missing something fundamental here i just don't know what lol... Last round still no luck... it seems like it only dose the insert...
by jeremybass
Sun Jan 20, 2008 3:13 pm
Forum: PHP - Code
Topic: is ELSE the right choice?
Replies: 20
Views: 998

Re: is ELSE the right choice?

ok i'v probly wrote this 50 times now... i'm so not sure... anyone got an idea on how where i should head? I know i'm close i'm just not sure now... here is the lastest version.... thanks foreach ($HTTP_POST_VARS['mark'] as $key=>$val) {  if ('CHECKED'== true) {            $sql_data_array = array('p...
by jeremybass
Sun Jan 20, 2008 2:41 pm
Forum: PHP - Code
Topic: is ELSE the right choice?
Replies: 20
Views: 998

Re: is ELSE the right choice?

ok so moving ahead i can get it to half work... so QUESTION?? "elseif('CHECKED'==false)" valid? i know if close but ... :) thanks for the help foreach ($HTTP_POST_VARS['mark'] as $key=>$val) {  if ('CHECKED'==true) {        $sql_data_array = array('products_id' => tep_db_prepare_input($val...
by jeremybass
Sun Jan 20, 2008 1:49 pm
Forum: PHP - Code
Topic: is ELSE the right choice?
Replies: 20
Views: 998

Re: is ELSE the right choice?

EDIT___ thought.... if the if statement is looking a is $picked == true ... is it looking at the query stated in the form or at the post var? i was thinking it was the post but now im not sure... ideas? the two closing curly brackets at the end are part of the great function that was working great b...
by jeremybass
Sun Jan 20, 2008 1:27 pm
Forum: PHP - Code
Topic: is ELSE the right choice?
Replies: 20
Views: 998

Re: is ELSE the right choice?

well i am just not sure :? i moved it to each loop then after the else statment... and the relsutes are all over the map... taking out the break; just deletes everthing... lol not full unexpected... just not sure how to move forward here... edit After formatting your i can do that here? don't i have...
by jeremybass
Sun Jan 20, 2008 1:17 pm
Forum: PHP - Code
Topic: is ELSE the right choice?
Replies: 20
Views: 998

Re: is ELSE the right choice?

Well now the first item on the check list is checked and nothing else is regardless of what is ckecked... this is what i'm thinking.... it's the "break;" :?: if ($picked == true) {   foreach ($HTTP_POST_VARS['mark'] as $key=>$val) {         $sql_data_array = array('products_id' => tep_db_p...
by jeremybass
Sun Jan 20, 2008 1:12 pm
Forum: PHP - Code
Topic: is ELSE the right choice?
Replies: 20
Views: 998

Re: is ELSE the right choice?

lol... ok i should have remebered that that was put of my problem yesterday... so i fixed it and only the only the top stays checked... was not expecting that... ideas? I'll see what i can pull out but i'm sure it's some stupid thing i keep over looking.... At least i'm moving forward... thanks for ...
by jeremybass
Sun Jan 20, 2008 1:05 pm
Forum: PHP - Code
Topic: is ELSE the right choice?
Replies: 20
Views: 998

is ELSE the right choice?

So working out the last problem i moved on to the next part and even though i just learned a few ways to show what is happening i hit a wall... sooo i put "WORKING INSERT INTO" and "WORKING DELETE FROM" in front of the cPath. THE QUESTION? well when i check an item it inserts jus...