Current location: Hot Scripts Forums » Programming Languages » PHP » saving data with PHP form


saving data with PHP form

Reply
  #1 (permalink)  
Old 04-28-04, 09:15 PM
sXenoGJ sXenoGJ is offline
New Member
 
Join Date: Apr 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Angry saving data with PHP form

At the moment im trying to make a little form so i can make an easy update thing for my friend so he doesnt need ot bother me...

Bassicly what i want:
A form that has an author field a date field and the update field so that when i post this information gets sent to the page and updates.

So what i need is to be able to save the posted information and make it so i can overwrite it with every post, at the moment I got a form that will do all that but wont save the data its just there until you leave the page.


The code im using:
**FORM**

<form action="welcome.php" method="POST">
Enter your name: <input type="text" name="name" />
Enter your age: <input type="text" name="age" />

<input type="submit">

</form>


**welcome.php**

<?php

echo "name = ".$name;

echo "<br />";

echo "age = ".$age;

?>


()()()()()

Yes i am a newb with php, advanced in html, but neways I kno echo only makes the text visible, but how would I make the text visible, saved, and rewritable with the next post of the form.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 04-29-04, 08:30 PM
sXenoGJ sXenoGJ is offline
New Member
 
Join Date: Apr 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
I think this may be fairly simple.. unless of course i need to makea database.... If i must make a data base for this to work, how do I write a database?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 04-30-04, 02:42 AM
the_mole001's Avatar
the_mole001 the_mole001 is offline
Newbie Coder
 
Join Date: Feb 2004
Location: Australia
Posts: 96
Thanks: 0
Thanked 0 Times in 0 Posts
Hey,

I suppose the first question is do you actually wanna use a mysql db? or would you rather always save it to a text file? I suppose they are both ok no matter which way you go, but I spose it comes down to, do u have access to mysql db's at all?

-Peter
__________________
Current Project: GGAC Website
Project Link: http://peter.5gigs.com/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 04-30-04, 10:17 PM
sXenoGJ sXenoGJ is offline
New Member
 
Join Date: Apr 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Yes I do have acess to a MySQL database but i have no idea how to wuse it or nething I dont know how to make a database
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 05-01-04, 12:25 AM
AutoObsession87 AutoObsession87 is offline
Newbie Coder
 
Join Date: Mar 2004
Location: Mahopac, NY
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Hey,
Well, probably the most simple solution would be to write to a text file, and you can get information on that at www.php.net. But, your best option would be using a mySql database because of its flexibility, security, and speed. Your best bet here would be to read a tutorial to get yourself started. You may want to try this one: http://hotwired.lycos.com/webmonkey/99/21/index2a.html

Either way, yes you need to write this information to some sort of file, be it a flat file (text) or a database.

Good luck, and dont hesitate to ask questions here as you move along!

-Scott-
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Writing from form to php config file Squid44th PHP 1 04-22-04 03:16 PM
problem with saving data in PHP. ray PHP 1 04-18-04 05:53 AM
Sending form data + attatchments in email php-learner PHP 2 02-14-04 01:18 AM
PHP Triad/Upload form eddyvlad PHP 6 10-07-03 12:17 AM


All times are GMT -5. The time now is 08:48 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.