Jump to content


Photo

Imput Into Table

burka

  • Please log in to reply
3 replies to this topic

#1 Screamwalker

Screamwalker

    Newbie

  • New Members
  • Pip
  • 3 posts

Posted 10 December 2012 - 02:17 PM

How to put things into my table? I've got the html code (input type...), but how to connect to the database and put text into tables?

#2 MrHaster

MrHaster

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 10 December 2012 - 02:26 PM

I was actually using a little project at the moment, you could try this:

<?PHP
IF(isset($_POST['Start']))
{
MYSQL_CONNECT(...);
MYSQL_SELECT_DB(...);

$One="INSERT INTO tabeltest(tabelone_name,tabeltwo_email)VALUES('{$_POST['name']}','{$_POST['email']}')";


MYSQL_QUERY($one);
MYSQL_CLOSE();
}
?>

#3 Pikachu2000

Pikachu2000

    I hate everything.

  • Staff Alumni
  • 11,378 posts
  • LocationFuture Independent Republic of Texas
  • Age:106

Posted 10 December 2012 - 02:37 PM

I'm assuming since you posted in the MS SQL forum, you're indeed using Microsoft SQL?

If so, here are all of the mssql functions: http://us1.php.net/m...n/ref.mssql.php

If not, what database are you using?
"Java" is to "Javascript" about the same as "fun" is to "funeral".

Why $_SERVER['PHP_SELF'] is bad. || Why ORDER BY RAND() is bad || Every problem can be solved with rm -rf *

Random Quote: "

#4 Screamwalker

Screamwalker

    Newbie

  • New Members
  • Pip
  • 3 posts

Posted 10 December 2012 - 02:46 PM

Thanks MrHaster, it works!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com