Jump to content
php.lv forumi

Kaut kas līdzīgs anketai


krisis32

Recommended Posts

mēģini:

 

<?
include('config.php');	

if(isset($_POST["niks"]) && isset($_POST["skype"]) && isset($_POST["team"]) && $_POST["niks"] != "" && $_POST["skype"] != "" && $_POST["team"] != "")
{
$niks = htmlspecialchars($_POST['niks']);
$skype = htmlspecialchars($_POST['skype']);
$team = htmlspecialchars($_POST['team']);
mysql_query("INSERT INTO komandas(niks, skype, komanda) VALUES('$niks', '$skype', '$team')") or die(mysql_error());
echo "Viss pievienots!";
}
else
{
echo "ERROR! Now you are gonna die!";
}
?>

<form method="post">
Niks <input name='niks' type='text'><br/>
Skype <input name='skype' type='text'><br/>
Komanda <select name='team'>
<option value='komanda1'>Komanda1</option>
<option value='komanda2'>Komanda2</option>
</select>
<input type='submit' value='Ievietot'>
</form>

Edited by eT`
Link to comment
Share on other sites

Maz jēga viņam palīdzēt? Atklāti parāda, ka viņš neko negrib darīt, bet gaida, kad viņam izdarīs.

kriksis32, kā jau iepriekšs minēja, iekšs posta ieliec print_r($_POST);

 

EDIT: A moška tev ir .html paplašinājums?

Edited by anonīms
Link to comment
Share on other sites

  • 4 weeks later...

Kapēc jūs nevarat visu vesalu ielikt uzreiz ar to kur DB_name | Username | Password vesalu script.. ? :D

laikam tāpē, ka visi ir slinki un/vai skaudīgi un ir žēl otram visu uzrakstīt priekšā :D:D:D

 

tu jau laikam gan visiem pēc kārtas palīdzi jebko, ko vien tev kāds paprasa izdarīt, vai ne? ;)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...