Home > Archive > PHP DB > October 2005 > Need help with delete and modify functions on a form.
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Need help with delete and modify functions on a form.
|
|
| Juan Stiller 2005-10-17, 6:55 pm |
| Hi, i īve got a php page that shows records from a
database (mysql), basically the php code retrieve info
from the database and display it, and with some htm i
īve made a table to show the recods, i need to add
several things to the page, but iīve no idea how to...
A) I need to add a modify command
B) A delete command.
C) If its possible i would like to add radio buttons
on each record, so people can mark and delete more
than one message at a time.
Can anyone help me with the php code or recommend a
good tutorial to doing this changes??
Thanks in advance.
Juan.
________________________________________
___________________
1GB gratis, Antivirus y Antispam
Correo Yahoo!, el mejor correo web del mundo
http://correo.yahoo.com.ar
| |
| Arie Nugraha 2005-10-18, 3:56 am |
| Checkbox form element is easy to applied in php
if you have a script like this :
<form>
<input type=3D"checkbox" name=3D"check1" value=3D"someValue"> Some Val=
ue
</form>
Then to get the value of checkbox you can do this :
<?php
// print the value of checkbox
echo $_POST["check1"];
?>
You can also use an array :
<form>
<input type=3D"checkbox" name=3D"check[]" value=3D"someValue1"> Some V=
alue 1
<input type=3D"checkbox" name=3D"check[]" value=3D"someValue2"> Some V=
alue 2
<input type=3D"checkbox" name=3D"check[]" value=3D"someValue3"> Some V=
alue 3
</form>
to get the the third value from the form you can do like this :
<?php
echo $_POST["check"][2];
?>
Hope that will help
On 10/17/05, Juan Stiller <juanstiller@yahoo.com.ar> wrote:
>
> --- Bastien Koert <bastien_k@hotmail.com> escribi=F3:
>
>
> Thanks Bastien, that would do the job, ill study it to
> adapt it to my needs.
>
> Another thing, i have some flash buttons, (im ussing
> dreamweaver), so once the records are displayed, user
> can filter the info lets say choosing the lastname
> filed, as its a precompiled button i only can specify
> a link.
>
> I saw once that with php you can specify pure code on
> the link funcion is there any chance to specify in the
> link section the filter code? like:
>
> SELECT * from mydatabase where lastname =3D 'john'???
>
> i think it was a way but i can=B4t find it now??
>
> Also, do you have any experience with checkbox on a
> form, i mean some tut??
>
> Thanks.
>
> Juan.
>
>
> =09
>
>
> =09
> =09=09
> ________________________________________
___________________
> 1GB gratis, Antivirus y Antispam
> Correo Yahoo!, el mejor correo web del mundo
> http://correo.yahoo.com.ar
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
|
|
|
|
|