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/25/05 18:28

"Rincewind" <the_rincewind@hotmail.com> skrev i meddelandet
news:cs2c7grc2pfj$.1a7ewva6hcy94.dlg@40tude.net...
> On Sun, 24 Jul 2005 19:24:57 GMT, Luigi Donatello Asero wrote:
>
> > "J.O. Aho" <user@example.net> skrev i meddelandet
> > news:3ki7isFuib21U1@individual.net...
> >> Luigi Donatello Asero wrote:
> >>> "J.O. Aho" <user@example.net> skrev i meddelandet
> >>> news:3ki3ofFud4lmU1@individual.net...
> >
> >> should be:
> >> if(array_key_exists('add', $_POST) && ($_POST['add']=="Skicka")) {
> >>
> >>> {$fornamn = $_POST['fornamn'];
> >> should be:
> >> $fornamn = $_POST['fornamn'];
> >
> > Do you mean only a"{" after "=="Skicka")) "?
> >
> > Well, I still get a error.
> >
> >
> > https://www.scaiecat-spa-gigi.com/sv/form.php
> >
> >
> > <html>
> > <body>
> > <?PHP
> > "array_key_exists{'add', $_POST)" && ($_POST['add']=="Skicka"){
> > $fornamn = $_POST['fornamn'];
> > $efternamn = $_POST['efternamn'];
> > $db = mysql_connect("local host", "user","password") or die('I could not
> > connect);
> > mysql_select_db("scaiecat_?", $db);
> > $query="INSERT INTO Formulr('frnamn','efternamn')
> > VALUES('$fornamn','$efternamn')";
> > mysql_query($query) or die('Error, insert query failed');
> > echo "Fljande har sparats till databasen:<br>\n
> > Frnamn: $fornamn<br>\n
> > Efternamn: $efternamn<br>\n";
> > } else {
> > ?>
> > <form method="post">
> > <label for="Fornamn">Frnamn</label>
> > <input type="text" name="fornamn" id="Fornamn"><br>
> > <label for="Efternamn">Efternamn</label>
> > <input type="text" name="efternamn" id="efternamn"><br>
> > <input type=submit name="add" VALUE="Skicka">
> > </form>
> > <?PHP
> > }
> > ?>
> > </body>
> > </html>
>
> As others have said you should get an editor with syntax highlighting,


Which editor with syntax highlighting which is freeware do you recommend and
why do you recommend just this one?
Could I use Linux and Windows on the same hard disk and how?

> $db = mysql_connect("local host", "user","password") or die('I could not
> connect);
>
> should be:
>
> $db = mysql_connect("local host", "user","password") or die('I could not
> connect');
>
> by using syntax highlighting you would pick up these errors real quick,
>
> I've run it through my server and it seems to parse ok, i.e. no error
> messages.

Well, I have corrected this mistake.

The page https://www.scaiecat-spa-gigi.com/sv/form.php shows a form but
when I enter data in the form the result is
"Error, insert query failed".
The question is what I missed this time.

--
Luigi Donatello (un italiano che vive in Svezia)
https://www.scaiecat-spa-gigi.com/sv/sardinien-alghero-semesterbostad.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

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация