Jump to content
eyexro

Intrebare html

Recommended Posts

Posted

daca am codul

<select>

<option>Alba-Iulia</option>

<option>Bucuresti</option>

<option>Cluj</option>

</select>

cum fac ca in scriptul de comanda

<form action="comanda/trimite.php" method="post">...... </form>

sa imi afiseze si rezultatul acestui "SELECT" ?

Posted

In html:


<form action="comanda/trimite.php" method="post">
<select id="oras">
<option value="Alba-Iulia">Alba-Iulia</option>
<option value="Bucuresti">Bucuresti</option>
<option value="Cluj">Cluj</option>
</select>
</form>

In 'comanda/trimite.php':


<?php

echo $_POST['oras'];

?>

ps: este doar un exemplu minimal. mare atentie la variabile, in special daca lucrezi cu interogari db.

Posted (edited)

multumesc pentru raspuns , si nu este ceva simplu .. e o firma de promvoare si vreau sa aflu pachetul inca nu le am cu conexiunile..

p.s - daca ai niste tutoriale si poti sa imi dai si mie un link prin PM , raman dator

//edit.. nu pot introduce in trimite pentru ca tot e un cod php si intra intre

<?php

?>

....

Parse error: syntax error, unexpected '<' in /.../..../..../comanda/trimite.php on line 6

Edited by eyexro
Posted

ceva tot gresesc eu...

am asa in index.html

<select id="pachet">

<option>SEO 120</option>

<option>SEO 240</option>

<option>SEO 360</option>

<option>Anunturi #1</option>

<option>Anunturi #2</option>

<option>Anunturi #3</option>

<option>Design #1</option>

<option>Design #2</option>

<option>Design #3</option>

</select><br>

iar in trimite.php .. am adaugat

{

echo $_POST['pachet'];

}

fata <?php si ?>

si tot nu apare...

Posted
<select id="pachet">

<option value="Seo120">Seo120</option>

<option value="Seo240">Seo240</option>

<option value="Seo360">Seo360</option>

<option value="Anunturi#1">Anunturi#1</option>

<option value="Anunturi#2">Anunturi#2</option>

<option value="Anunturi#3">Anunturi#3</option>

<option value="Design#3">Design#3</option>

<option value="Design#3">Design#3</option>

<option value="Design#3">Design#3</option>

</select><br>

si nimic.. e pus..

cropo.png

toate info le primesc mai putin raspunsul la acel "quiz"...

Posted
el trimite.. doar partea astea nu merge cu select

Scoate al 2-lea FORM, ce nu în?elegi ? între tagurile <FORM ...> </FORM> nu trebuie s? existe ALT <FORM ..></FORM>, altfel , con?inutul din cel de-al 2-lea nu-l trimite, ?i asta e ?i problema ta.

Posted

TRIPPLE FACEPALM!

Coaie... e HTML nu e bomba nucleara ! ! ! ! ! ! ! ! !

Google + w3 schools iti dadea raspunsu instant....

Cat despre html invata mai intai tagurile principale <html><head></head><body></body></html>

Cum plm vrei sa faci un form daca tu nu stii nici lucrurile de baza ?

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.



×
×
  • Create New...