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 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
Jump to Postplease guide me how should i check whether a database named info exists or not? if it exists then perform update operation otherwise perform create database operation.
Simplest way would probably be to just try to open the database and see if it works.
Something like:<?php …
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.