4 Replies - 1161 Views - Last Post: 25 July 2002 - 07:52 AM Rate Topic: -----

#1 capty99  Icon User is offline

  • i am colt mccoy
  • member icon

Reputation: 98
  • View blog
  • Posts: 10,081
  • Joined: 26-April 01

Forms

Posted 23 July 2002 - 08:51 PM

i need to know how to get my html form to publish to my db...

im guessing the php file will involve, connecting to the db which i got, then doing an sql statement to insert the actual info into the db... ex.

INSERT staff (text) VALUES ('%%%%%%%%%%%%%%%%');

but in place of the %%%%%%%%%%%%% i guess i put a variable....

thats all i know, walk me through it...

ive got textbox one...
need it to change info in db field "text"


muchos gracias.

Is This A Good Question/Topic? 0
  • +

Replies To: Forms

#2 klewlis  Icon User is offline

  • cur tu me vexas?

Reputation: 8
  • View blog
  • Posts: 1,723
  • Joined: 09-November 01

Re: Forms

Posted 24 July 2002 - 08:20 AM

INSERT INTO staff (text) VALUES ('$textvar') WHERE id = '$staffID'


that what you're looking for? :)

Don't forget to format your text for quotation marks (single or double).
Was This Post Helpful? 0
  • +
  • -

#3 capty99  Icon User is offline

  • i am colt mccoy
  • member icon

Reputation: 98
  • View blog
  • Posts: 10,081
  • Joined: 26-April 01

Re: Forms

Posted 24 July 2002 - 11:15 AM

ha, no thats not exactly...

like what do i put in the html page to send this info off or w/e...

im just guessing on most things so it would be best if someone could start out from the beginning.
Was This Post Helpful? 0
  • +
  • -

#4


Reputation: 0

Re: Forms

Posted 24 July 2002 - 11:48 AM

use a form
the action should = the .php page
and the field names should equal the names of the variables you want in the php page.

ex: <input type='text' name='var'>
becomes a variable $var with a value = to what ever was in the text box when you submitted the page.

H
Was This Post Helpful? 0

#5 klewlis  Icon User is offline

  • cur tu me vexas?

Reputation: 8
  • View blog
  • Posts: 1,723
  • Joined: 09-November 01

Re: Forms

Posted 25 July 2002 - 07:52 AM

there's a tutorial at http://codewalkers.c...als.php?show=12 that walks you through the whole process. :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1