You are here: Re: Send data form to mysql « PHP SQL « IT news, forums, messages
Re: Send data form to mysql

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

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация