Jump to content
php.lv forumi

form + db


hEiti

Recommended Posts

<form action="products_insert.php" method="post">
Grupa<br>
<select name="izvelne"  method="">
 <option value="gr" selected>GR Series</option>
 <option value="grs">GRS Series</option>
 <option value="hr">Hr Series</option>
 <option value="gps">GPR Series</option>
 <option value="gir">GIR Series</option>
 <option value="cpr">CPR Series</option>
 <option value="brm">BRM Series</option>
 <option value="brh">BRH Series</option>
 <option value="ha">HA Series</option>
</select>  
<br>

 Modelis<br>
 <input type="text" name="modelis" />
 <br>
 Celtspēja<br>
<input type="text" name="celtspeja" />
<br>
<input type="submit" value="Pievienot" /></form>

 

ta tas varetu izskatities pec mana labojuma.. ir vell kkas ?

man jau reali vajag palidzibu :D salasijos neta pa shito erroru un nekadigi netieku gala :(

Edited by hEiti
Link to comment
Share on other sites

Liels paldies :P palasiju un atradu ari pats savu prob :P laikam submit pogas nak profilaktiski tikai pa labu :)

tagad man tik talak 1 apakshjautajums radies..

Situacija:

No lapas1 uz lapu2 parsutas $_post vertiba

lapa 2 paradas saturs atkarigs no $_post vertibas .. bet tagad kad uzspiez piem delete tiek iekljauta lapa3 .. bet lidz tai neaiziet vertiba $_post.. kadi ir ieteikumi ka es varu panakt kad tads kads $_post ienak 2 lapa tiek padots ari uz 3so lapu ?

 

izdomats - sesijas :)

Edited by hEiti
Link to comment
Share on other sites

$sql="DELETE FROM $_GET[list]_produkti WHERE id='$id'";
$result=mysql_query($sql);
echo mysql_error();

 

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?id=23_produkti WHERE id=''' at line 1ERROR

 

Nu andri shoreiz atkal jau netieku gala.. varbut saki lasam vielu vai ari dod padomu :) bet lapas adrese kad ieiet 3 lapa ir:

delete_ac.php?list=GPR?id=23 taka lidz tam strada :)

Link to comment
Share on other sites

$_GET['list'] vertiba ir pieskirta parbaudiju ar print..

bet neizdodas vinju ievadit $sql="DELETE FROM $_GET['list;]_produkti WHERE id='$id'";

---->$_GET['list']<----- te :(:( itka pat ir ieslegts error reportings bet paradas balta lapa .. lai gan ja notiek kluda jarada error bet ja ok tad sucs.. :(

Edited by hEiti
Link to comment
Share on other sites

×
×
  • Create New...