Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
HELP PLEASE - Php Back Button
Old 05-07-2011, 02:37 PM HELP PLEASE - Php Back Button
Junior Talker

Posts: 2
Trades: 0
Hi,

I am new to this forum and absolutely new to php and mysql.

I have managed to create a extremely simple html form which saves the data to a small mysql database.

Please be aware, this will look very childish to some experts out there.

This is what happens. I have a html form, a database and a input.php form. the input.php for gets the details from the html form and saves them to the database. I can do this and only this. I would love to be able to delete and edit records, but I can't do it as I don't know how to use php. Its taken me 2 weeks sorting the database out.

what i would like the form to do is, when submit form is clicked, the input.php page loads, currently I have managed to put a message on there. what I would like is a button, which when pressed, takes the user back to the form, which has been reset.

OR, is there a way to stay on the same html page after clicking submit??

if anybody can help, please do.

thanks
subversive is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-07-2011, 02:51 PM Re: HELP PLEASE - Php Back Button
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Yes, put the php code to collect the data on the same page as the form.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 05-07-2011, 05:20 PM Re: HELP PLEASE - Php Back Button
Junior Talker

Posts: 2
Trades: 0
Quote:
Originally Posted by chrishirst View Post
Yes, put the php code to collect the data on the same page as the form.
okay, sounds simple enough. Do I just copy and paste it or would I need to change anything?
subversive is offline
Reply With Quote
View Public Profile
 
Old 05-08-2011, 06:14 AM Re: HELP PLEASE - Php Back Button
lizciz's Avatar
Super Spam Talker

Posts: 807
Name: Mattias Nordahl
Location: Sweden
Trades: 0
Quote:
Originally Posted by chrishirst View Post
Yes, put the php code to collect the data on the same page as the form.
Yes, at it's very simplest you basically do this:
Code:
if form has been submitted
   check the sent form data
   add it to the database
end if

show form here
And the action attribute of the form should point to itself.
I'll let you work out the actual code yourself, since that's a good way of learning.
I had alot of help from tizag.com and w3schools.com when I was new to php and MySQL, you might want to check them out.
__________________
Your answers will only be as good as your question. Formulate it well and give all the necessary information.
lizciz is offline
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Reply     « Reply to HELP PLEASE - Php Back Button
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13571 seconds with 12 queries