| | |
trying to create a 'simple' admin page to update mysql dbase
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Aug 2004
Posts: 24
Reputation:
Solved Threads: 0
Hi,
I am trying to create a 'simple' admin page where certain (authorized) people can update data in the database or add new info to it. The issue i've run into is after i created the form and have all the fields how do i tell which one(s) the user has typed into/edited so i can use that info in a query.
I was thinking i might need to use the onchange event but not sure how i'd track each field that was changed and then update only those, i even checked some of phpmyadmin's code to see how they do it but couldnt really figure it out.
Help plz
I am trying to create a 'simple' admin page where certain (authorized) people can update data in the database or add new info to it. The issue i've run into is after i created the form and have all the fields how do i tell which one(s) the user has typed into/edited so i can use that info in a query.
I was thinking i might need to use the onchange event but not sure how i'd track each field that was changed and then update only those, i even checked some of phpmyadmin's code to see how they do it but couldnt really figure it out.
Help plz
Well that's more of a PHP thing, not so much with JavaScript. You can't do alot(anything?) in Javascript to interact with a database.
GCS d- s+ a-->? C++(++++) UL+++ P+>+++ L+++ E--- W+++
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r y+
PMs asking for help will not be answered, post on the forums. That's what they're there for.
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r y+
PMs asking for help will not be answered, post on the forums. That's what they're there for.
•
•
Join Date: Aug 2004
Posts: 24
Reputation:
Solved Threads: 0
well the thing is i'm not interacting with the database at this point. The 'fields' i'm referring to are the html form fields where a user would type things such as a name, etc.
e.g. If i had:
How do i tell which field the user has typed in here (sci name/com name or both) so that i can pass that text into a query later on.
e.g. If i had:
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
Search for a Plant to update: Scientific Name _____ Common Name _____ [Search]
How do i tell which field the user has typed in here (sci name/com name or both) so that i can pass that text into a query later on.
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
var blah = document.getElementById(<textbox id>); if(blah.value == "") alert("blah is empty");
GCS d- s+ a-->? C++(++++) UL+++ P+>+++ L+++ E--- W+++
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r y+
PMs asking for help will not be answered, post on the forums. That's what they're there for.
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r y+
PMs asking for help will not be answered, post on the forums. That's what they're there for.
You can just validate it through javascript(Or to check if that field has some value or not.) But, Its much easier if you do it in php. eg.
php Syntax (Toggle Plain Text)
if(isset($_POST['sci_name'])){ echo "Scientific name is ". $_POST['sci_name']; } if(isset($_POST['name'])){ echo "General name is ". $_POST['name']; }
Ignorance is definitely not bliss!
*PM asking for help will be ignored*
*PM asking for help will be ignored*
![]() |
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: cant get the spacing on menu bottons to change
- Next Thread: JavaScript not working in Internet Explorer 7
Views: 1936 | Replies: 4
| Thread Tools | Search this Thread |
Tag cloud for JavaScript / DHTML / AJAX
acid2 ajax ajaxcode ajaxhelp animate array automatically autoplay beta boarder box bug button calendar captcha card cart codes column cookies createrange() css cursor date debugger decimal design developer dom download dropdown element enter error events firefox firehose flash focus form frameworks getselection google gwt html htmlform iframe image() index java javascript javascripts jawascriptruntimeerror jquery jsp listbox maps marquee masterpage menu microsoft mimic mp3 mp4 offline onmouseover parameters php player post problem programming progressbar prototype rating redirect regex safari scale scriptlets search select size sources sql starrating text textarea toggle twitter validation variables w3c web website window windowofwords windowsxp xml xspf






