Hi
I m making web page and for that i am using mysql and php. In tha i enter data and that is to be stored in mysql database. I m having a problem in that. I want add, delete, previous, next, cancel and update button in that. But can't make all buttons work differently.
I want all buttons performing different function.
Pls guide me what should i do...
Thanx in advance 2 all great minds who'll help..
sumit007
0
Newbie Poster
Recommended Answers
Jump to PostFirst things first, you need to write simple algorithms/procedures for your desired tasks. From what i see the simple steps would be something like.
1. click add takes you to page for adding data
2. click update modifies your data
3. click delete will take you to page for deletion
…
Jump to PostPost your code and we'll have a look at it.
Jump to PostHey.
Simplest solution, just name all your submit buttons the same and do stuff based on the value.
Like, if you have this form:
<form action="process.php" method="post"> <input type="submit" name="button" value="Add"> <input type="submit" name="button" value="Delete"> </form>
You could do this:
<?php if($_POST['button'] …
Jump to PostThere are a few errors in that code.
1) You open the database connection outside the add function, and then try to use it inside the function. This doesn't work, because the function operates on a different
All 15 Replies
wilch
5
Junior Poster in Training
sumit007
0
Newbie Poster
diafol
Atli
182
Posting Pro
diafol
commented:
never thought of doing that - nice one
+3
aviralmsharma
commented:
Sweet, Simple and Works perfect !
+0
sumit007
0
Newbie Poster
Atli
182
Posting Pro
sumit007
0
Newbie Poster
Atli
182
Posting Pro
sumit007
0
Newbie Poster
Atli
182
Posting Pro
sumit007
0
Newbie Poster
Atli
182
Posting Pro
sumit007
0
Newbie Poster
Atli
182
Posting Pro
sumit007
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.