|
Posted by Luigi Donatello Asero on 07/24/05 16:08
"Stefan Rybacki" <stefan.rybacki@gmx.net> skrev i meddelandet
news:3khgmsFuf70eU1@individual.net...
> Luigi Donatello Asero wrote:
> > How do I send data form to mysql and insert them in a table which I
have
> > already created to get these data in the database
> > mysql?
> > Should I first check it up whether the form has already been filled in
and
> > afterwards connect to the database?
>
> Have a look at the manual of PHP at the section of MySQL.
>
> I guess you're italian:
> http://www.php.net/manual/it/ref.mysql.php
>
> Regards
> Stefan
>
> PS: it sounds like you also should have a look at a html manual
Yes, I am Italian but I have already read about php and html in many
different languages
You suggest that I should have
have a look at a html manual.
HTMl is a very wide subject.
Mostly I have read about html
at
http://www.w3.org/
for a long time.
Did you think about a particular subject?
As to php,
what is wrong in this code?
<body>
<?php
if(isset($_POST['add']));
$fornamn = $_POST['fornamn'];
$efternamn = $_POST['efternamn'];
$db = mysql_connect("local host", "user", "password");
mysql_select_db("scaiecat_?", $db);
$query = "INSERT INTO Formulδr ('local host', 'user', 'password');
VALUES ('fφrnamn' ( '$fornamn'), efternamn('$efternamn')";}
mysql_query($query) or die('Error, insert query failed'}};
else
{#print"<p>Inserted ok.</p>;};
<form method="post">
<LABEL FOR="Fornamn">Fφrnamn</LABEL>
<INPUT TYPE="TEXT" NAME="fnamn" id="Fornamn"><br>
<LABEL FOR="Efternamn">Efternamn</LABEL>
<LABEL FOR="efternamn">efternamn</LABEL>
<INPUT TYPE="TEXT" NAME="efternamn" id="efternamn"><br>
<INPUT TYPE=SUBMIT VALUE=Skicka>
</FORM> </form>
}
?>
</body>
</html>
--
Luigi Donatello (un italiano che vive in Svezia)
https://www.scaiecat-spa-gigi.com/sv/boende-i-italien.php
[Back to original message]
|