Re: [PHP-DB] handling of checkboxvalues
Luis Morales wrote: Well, you can do this... form name='my_form' method='post' action='form.php' ENCTYPE='multipart/form-data' input type='checkbox' name='user_loeschen[] value=?= $id ? id=?= $id? input type=submit name=submit value=send form /form Actually I have written this script to check the checkbox. This bring me an error telling me that I have forgot to set a ; but I think I ve coded something wrong with simple and dopple quots. Regards, Ruprecht html head titleTest/title /head body form ? echo input type='checkbox' name='aus_id[]' value='.$aus_konto[konto].erl=I'; ? /form /html -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] mysql_client_encoding in greek
Hello list. I install mysql 4.1.7 and php 5.1.2 on win2000. I use apache 2.0.45 My problem is that the result from dbs are like ??. Its obvious that is a character set problem. The dbs are set as Greek, as the default-character-set. In php.ini is set default_charset = iso-8859-7 which is the Greek model. But when I run mysql_client_encoding I got swedish_something! How can I solve these? Thank you in advance
[PHP-DB] Problems by transfer of arrayed formfield
Hi I have to scripts that should transfer values of a checkbox into another script that put them out. You see that the value of the checkbox is stored in a array-variable. By putting out the value of the arrayvariable there is no output. What can be wrong. Enclosed the two scripts. Regards, Ruprecht html head titleTest/title /head body form action=form_test2.php gesamt louml;chen nbsp;nbsp; ? for ($i=0;$i=5;$i++) { echo input type=checkbox name='aus_id[$i]' value=$i; //$user_id = $aus_konto[kontoinp]; //echo input type='checkbox' name='aus_id[]' value='$user_id'; } ? input type=submit value=ausführen input type=reset value=abbrechen /form /html html head titleTest/title /head body ? for ($i=0;$i=5;$i++) { echo $aus_id[i]; } //$user_id = $aus_konto[kontoinp]; //echo input type='checkbox' name='aus_id[]' value='$user_id'; ? /form /html -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] handling of checkboxvalues
Hi Luis, you can do this... form.php ? if($_POST['submit'] == 'send form'){ for($i=0;count($_POST['user_loeschen'])$i;$i++){ --- put here your sql statement to delete user --- ej... delete from users where id = '{$_POST['user_loeschen'][$i]}' --- } } ? form name='my_form' method='post' action='form.php' ENCTYPE='multipart/form-data' input type='checkbox' name='user_loeschen[] value=?= $id ? id=?= $id? input type=submit name=submit value=send form /form I think I made it like the same you tell me. Look into the other mail I post to the list. Regards, Ruprecht -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Problems by transfer of arrayed formfield
html head titleTest/title /head body ? for ($i=0;$i=5;$i++) { echo $aus_id[i]; //try echo $_POST['$aus_id][$i] } //$user_id = $aus_konto[kontoinp]; //echo input type='checkbox' name='aus_id[]' value='$user_id'; ? /form /html
Re: [PHP-DB] Problems by transfer of arrayed formfield
Hi antispo, html head titleTest/title /head body ? for ($i=0;$i=5;$i++) { echo $aus_id[i]; //try echo $_POST['$aus_id][$i] } //$user_id = $aus_konto[kontoinp]; //echo input type='checkbox' name='aus_id[]' value='$user_id'; ? /form /html Ok I clickt on the 1st and 3rd checkbox. I stored the value of $i as value into the checkbox-array. The result should be 0 2, but I does not get an result. The only I get is an empty page. Regards, Ruprecht -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Problems by transfer of arrayed formfield
r1.php form action=r2.php method=POST ?php for($i=1; $i=5; $i++) { echo input type=checkbox name=\ids[]\ value=. $i .; } ? input type=submit value=OK / /form r2.php ?php $ids = $_POST['ids']; foreach ($ids as $i) { $new_ids[] = $i; } print_r($new_ids); ? ..iterate trough the submited array with foreach instead of for...