a.html
Cita:
a.php<html>
<head></head>
<body>
<form action="a.php">
<input type="text" name="malo" id="malo">
<input type="submit">
</form>
</body></html>
<head></head>
<body>
<form action="a.php">
<input type="text" name="malo" id="malo">
<input type="submit">
</form>
</body></html>
Cita:
Y me sale el siguiente error:<html>
<head></head>
<body>
<?php
$fp = fopen("a.txt","w"); //abrimos el archivo para escritura
fwrite($fp, "$_POST['malo']");
fclose($fp); //cerramos la conexión y liberamos la memoria
?>
</body>
</html>
<head></head>
<body>
<?php
$fp = fopen("a.txt","w"); //abrimos el archivo para escritura
fwrite($fp, "$_POST['malo']");
fclose($fp); //cerramos la conexión y liberamos la memoria
?>
</body>
</html>
Cita:
Creo que será algo sencillo pero no se porque no vaParse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in D:\wamp\www\a.php on line 6
me podeis ayudar???