Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

variable with no value!!!

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

variable with no value!!!

Postby parxal » Fri Nov 08, 2002 4:01 am

on index.php

<form name="form1" method="post" action="enviar.php">
<p>Nome :
<input type="text" size=40 name="nome">
</p>
<p>Morada:
<input type="text" size=40 name="morada">
</p>
<p>Email:
<input type="text" size=40 name="email">
</p>
<p>Url:
<input type="text" size=40 name="url">
</p>
<p>
<input type="submit" name="submit" value="Enter information">

</form>


on enviar.php
<?
echo $nome
?>

This code isn't working, it doesn´t write anything! $nome variable is null, why? can anyone help me?
parxal
New php-forum User
New php-forum User
 
Posts: 40
Joined: Thu Nov 07, 2002 5:58 am

Postby Oleg Butuzov » Fri Nov 08, 2002 4:32 am

if (isset($nome))
{
echo "$nome";
}
Oleg Butuzov
Last Samuray
Last Samuray
 
Posts: 831
Joined: Sun Jun 02, 2002 3:09 am

the problem is not that!

Postby parxal » Fri Nov 08, 2002 11:17 am

i fill the field "nome" in the form, and the variable $nome is empty!
why?
parxal
New php-forum User
New php-forum User
 
Posts: 40
Joined: Thu Nov 07, 2002 5:58 am

Postby Oleg Butuzov » Fri Nov 08, 2002 1:08 pm

I tested your script it works!


<?
echo $nome;
?>

P.S.
What version oh PHP you use ?
Oleg Butuzov
Last Samuray
Last Samuray
 
Posts: 831
Joined: Sun Jun 02, 2002 3:09 am


Return to PHP coding => General

Who is online

Users browsing this forum: Google [Bot], Google Feedfetcher and 3 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.