multi line edit with php and mysql

Posted by recklessop, 01-15-2008, 09:54 PM
Does anyone know of an example of a php mysql script. basically i want to be able to display multiple variables and edit them then click a single save button and have the script update the database database structure for the example is varchar name varchar value one row might be : name = taxrate value = .07 what i want is a script that will display all rows into a table and have input boxes for the values (i can get it to display) but im not sure how to pass the values in the form to the action script.. probably an array but not sure

Posted by Barti1987, 01-15-2008, 11:31 PM
A script like this would run for $15-$25 dollars. Try looking for a freelancer. Peace,

Posted by Czaries, 01-15-2008, 11:51 PM
You can just select all the records from the database and iterate over them to display a bunch of text boxes to edit them in. When you pass them back on a POST to save them, you will want your form fields to look something like this: And that will pass an array to the PHP script and you can do: Or better yet use PDO to prepare the SQL statement before the loop, and then just execute it multiple times with the execute() function inside the loop.

Posted by recklessop, 01-16-2008, 10:44 AM
QUOTE=Czaries;4907765]QUOTE] I understand all that except the ? $_POST... : NULL; what does the ? and the : NULL do? Thanks alot for the help

Posted by Czaries, 01-16-2008, 03:49 PM
It's basically a contracted IF-ELSE statement. That one-liner is equal to this:

Hjälpte svaret dig?

 Skriv ut denna artikeln

Läs även

looking for a PHP/Opensource Voting/poll system..

Posted by CyberHostPro, 08-16-2011, 07:49 AMHello I have told a local charity i'll help them...

Redirect domain/user to user.domain ONLY IF folder 'user' doesn't exist

Posted by ThatScriptGuy, 05-07-2007, 04:22 PMWell, I thought I knew enough about my .htaccess...

Dataphorce update

Posted by AL-Benjamin, 09-27-2001, 12:58 PMHi there, this is really just an update to the...

lxadmin dns template

Posted by paul-naama, 09-15-2007, 06:36 PMhello all. i just signed up for a new vps host...

Forwarding/Default+POP3 Addy Doesnt Work - Piping/Webmail Works

Posted by InfiniteTech, 09-13-2007, 02:06 PMHello, My server which runs cPanel (license issued...