somebody explains to me

Web page creation, programs, scripts, PHP, SQL?

Moderator: Moderators

Postby synerz1_debian » Wed Aug 18, 2004 9:00 am

somebody explains to me: why this script doesnt work???

if ($submit) {
echo "Información introducida.\n";
} else{
<form method="post" action="<?php echo"$PHP_SELF"?>">
Nombre:<input type="Text" name="nombre"><br>
<input type="Submit" name="submit" value="Enter information">

} // end if


Postby miker_alpha » Wed Aug 18, 2004 2:45 pm

Well, this does.
Check for differences:
Code: Select all
$submit = $_POST['nombre'];
if ($submit) {
echo "Informacion introducida.\n";
    } else {
echo "<form method=\"post\" action=\"$PHP_SELF\">";
echo "Nombre:<input type=\"Text\" name=\"nombre\"><br>";
echo "<input type=\"Submit\" name=\"submit\" value=\"Enter information\">";
echo '</form>';


Good luck!

Look for OpenVMS help on my webpage
Check for QOTD here.
User avatar
Posts: 256
Joined: Sat May 08, 2004 9:20 am
Location: Kibbutz Tzora, Israel

Postby prince18th » Tue Oct 05, 2004 5:30 am

Change : <form method="post" action="<?php echo"$PHP_SELF"?>">
To : <form method="post" action="<?=$PHP_SELF?>">
It's a small error in syntax but hard to see ... I think it works now

Return to Web development

Who is online

Users browsing this forum: No registered users and 1 guest