Pagina 1 din 1

Problema formular HTML

Scris: Vin Apr 10, 2015 11:43 pm
de kovacskriszti
Buna seara.
Lucrez la un jooc de spanzuratoare si am intampinat urmatoarea problema, folosesc Smarty pentru template-uri si am un template cu un formular in el facut cu Microsoft Web Expression. Problema este ca nu se preia in PHP ce se trimite cu formularul din pagina, problema este clar de la template ca am facut o alternativa mai simpla, scris de mana si acela a functionat. Codul HTML este mai jos:


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body bgcolor="#ff0000" link="#0000EE" text="#3366ff" vlink="#ff6600"
alink="#3366ff">

{if $message == 2}
Corect, litera {$lastLetter} face parte din cuvantul dat!<br><br>
{else if $message == 1}
Gresit, litera {$lastLetter} nu face parte din cuvantul dat!<br><br>
{else}
Alege o litera:<br><br>
{/if}


<div align="center"><font size="+3"><b><font face="David"><big><br>
</big></font></b></font>
<table bgcolor="#33cc00" border="1" cellpadding="2"
cellspacing="2" width="100%">
<tbody>
<tr>
<td valign="top"><br>
</td>
</tr>
</tbody>
</table>
<font size="+3"><b><font face="David"><big><br>
Spânzurătoarea</big></font></b></font><br>
</div>
<font size="+3"><br>
<br>
<font face="Monotype Corsiva">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

Cuvântul de completat:</font><br>
</font>
<div align="center"><font size="+3">{$word}</font><br>
</div>
<font size="+3"><br>
</font>
<form method="get" action="game.php">
<div class="auto-style1" align="center"> <font color="#330099"><big><input
name="letter" value="Q" type="submit"><input name="letter"
value="W" type="submit"><input name="letter" value="E"
type="submit"><input type="submit" name="letter" value="R"><input
name="letter" value="T" type="submit"><input name="letter"
value="Y" type="submit"><input name="letter" value="U"
type="submit"><input name="letter" value="I" type="submit"><input
name="letter" value="O" type="submit"><input name="letter"
value="P" type="submit"><br>
<input name="letter" value="A" type="submit"><input
name="letter" value="S" type="submit"><input name="letter"
value="D" type="submit"><input name="letter" value="F"
type="submit"><input name="letter" value="G" type="submit"><input
name="letter" value="H" type="submit"><input name="letter"
value="J" type="submit"><input name="letter" value="K"
type="submit"><input name="letter" value="L" type="submit"><br>
<input name="letter" value="Z" type="submit"><input
name="letter" value="X" type="submit"><input name="letter"
value="C" type="submit"><input name="letter" value="V"
type="submit"><input name="letter" value="B" type="submit"><input
name="letter" value="N" type="submit"><input name="letter"
value="M" type="submit"></big></font></div>
</form>
</body>
</html>

Re: Problema formular HTML

Scris: Sâm Apr 11, 2015 12:46 am
de nevvermind
1. http://pastie.org/10085460 Cu placere
2. Cum adica nu preia? var_dump($_GET) e gol? Cum se seteaza $message?

Re: Problema formular HTML

Scris: Sâm Apr 11, 2015 10:42 pm
de kovacskriszti
var_dump întoarce că este string(1) şi litera aleasă dar în script nu se preia, iar în celălalt template mergea.

Re: Problema formular HTML

Scris: Mar Apr 14, 2015 6:22 pm
de beng
In game.php nu iti intoarce var_dump dupa ce dai submit?