|
| how to start debugging | |
Joined: 09 Sep 2006 |
Posts: 5 |
|
|
|
Posted: Fri Sep 08, 2006 10:03 pm |
|
|
|
|
|
I try to run this simple codes:
Forma1:
<HTML>
<HEAD>
<STYLE TYPE=”text/css”>
<!--
BODY, P {color: black; font-family: verdana;
font-size: 10 pt}
H1 {color: black; font-family: arial; font-size: 12 pt}
-->
</STYLE>
</HEAD>
<BODY>
<TABLE BORDER=0 CELLPADDING=10 WIDTH=80% align=CENTER>
<TR>
<TD BGCOLOR="#F0F8FF" ALIGN=CENTER VALIGN=TOP></TD>
<TD BGCOLOR="#FFFFFF" ALIGN=LEFT VALIGN=TOP>
<H1>Newsletter sign-up form</H1>
<FORM METHOD="POST" ACTION="Forma2.php">
<P>Su Nombre:</P>
<INPUT TYPE="text" SIZE=25 NAME="nombre">
<BR>
<P>Su Email:</P>
<INPUT TYPE="text" SIZE=25 NAME="email">
<BR>
<P>Su Teléfono:</P>
<INPUT TYPE="text" SIZE=25 NAME="telefono">
<BR>
<BR>
<INPUT TYPE="submit" NAME=”submit” VALUE="Submit">
</FORM>
</TD>
</TR>
</TABLE>
</BODY>
</HTML> |
Forma2:
<HTML>
<HEAD>
<STYLE TYPE=”text/css”>
<!--
BODY, P {color: black; font-family: verdana;
font-size: 10 pt}
H1 {color: black; font-family: arial; font-size: 12 pt}
-->
</STYLE>
</HEAD>
<BODY>
<TABLE BORDER=0 CELLPADDING=10 WIDTH=100%>
<TR>
<TD BGCOLOR="#F0F8FF" ALIGN=CENTER VALIGN=TOP WIDTH=17%>
</TD>
<TD BGCOLOR="#FFFFFF" ALIGN=LEFT VALIGN=TOP WIDTH=83%>
<H1>Newsletter sign-up form</H1>
<?php
if (!$_POST['email'] || $_POST['email'] == "" ||
strlen($_POST['email']) > 30) {
echo '<P>There is a problem. Did you enter an email address?</P>';
} else {
// Open connection to the database
mysql_connect("localhost", "root", "doremi")
or die("Failure to communicate with database");
mysql_select_db("test");
// Insert email address
$as_email = addslashes($_POST['email']);
$tr_email = trim($as_email);
$tr_nombre = $_POST(['nombre']);
$tr_telefono = $_POST(['telefono'];
$query = "INSERT INTO pruebas (NOMBRE, EMAIL,TELEFONO) VALUES('$tr_nombre', '$tr_email', '$tr_telefono)";
$result = mysql_query($query);
if (mysql_affected_rows() == 1) {
echo '<P>Your information has been recorded.</P>';
} else {
error_log(mysql_error());
echo '<P>Something went wrong with your signup attempt.</P>';
}
}
?>
</TD>
</TR>
</TABLE>
</BODY>
</HTML> |
Buit I receive this error
SRV Server:
Document Contains no data.
Please, what is wrong?
Thanks for your help
|
|
|
| | |
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
All times are GMT - 5 Hours
Page 1 of 1
|
|
|
| |