@ the top
Code: Select all
require ("include/config.php");
require ("include/styles.php");
require ('db.php');config has all the mail tables and db the db tables and inserting constructions
db.php
Code: Select all
<?php
$connect= mysql_connect('localhost', 'root')
or die("Cant connect: " .mysql_error());
$result=mysql_select_db($dbase)
or die("Cant execute query: " .mysql_error());
$query = "CREATE TABLE IF NOT EXISTS ".$tablename." (Empresa varchar(20) Not Null, Codigo INT auto_increment, Desde varchar(20) Not Null, Envio varchar(20) Not Null, Information varchar(20) Not Null, Comentario varchar(20) Not Null, Codigo_Env INT(15), PRIMARY KEY (Codigo) )";
$result = mysql_query($query);
if (!$result)
{
die ( "Execute error: " .mysql_error());
}
else
{
echo "Connectando Con Base Datos ".$tablename." , avancar!\n";
}
$query ="INSERT INTO ".$tablename." ('".$Empresa."','".$Codigo."','".$Desde."','".$Envio4."','".$Information."','".$Comentario."')";
if (!$result = mysql_query($query))";
die ( .mysql_error())";
?>FORM CODE
Code: Select all
<?php
<form method="POST" action=<?php $_SERVER[PHP_SELF] php?>
<p class="e">
Empresa<font size=8><input type=text name="Empresa" cols="25" rows="1" size="20" ></textarea><br>
</font>Codigo<font size=8><input type=text name="Codigo" cols="20" rows="1" size="20"></textarea><br>
</font>Desde<font size=8><input type=text name="Desde" cols="20" size="20"></textarea><br>
</font>envio<font size=8><input type=text name="Envio" cols="20" size="20"></textarea><br>
</font>Informacion<font size=8><input type=text name="Information" cols="20" size="20"></textarea><br>
</font>Comentario<font size=8><textarea name="Comentario" rows="4" cols="20" size="18"></textarea><br>
<p>
<br>
<p></td>
<td width="328" height="211" class="e" align="right">
<class="e">
Peso Total<font size=8><input type=text name="Peso_Total" cols="8" size="10"</input></font><br>
Peso<font size=8><input type=text name="Peso" cols="8" size="10"</input></font><p>
Valor<font size=8><input type=text name="Valor" cols="12" size="16"</input></font>
<p>
<br>
<Div class="r"><input name="submit" type="submit" ID="Avancar" WIDTH="5" </form>
?>Code: Select all
Connectando Con Base Datos pongo , avancar!
Notice: Undefined variable: Empresa in c:\apache\htdocs\docs\db.php on line 19
Notice: Undefined variable: Codigo in c:\apache\htdocs\docs\db.php on line 19
Notice: Undefined variable: Desde in c:\apache\htdocs\docs\db.php on line 19
Notice: Undefined variable: Envio4 in c:\apache\htdocs\docs\db.php on line 19
Notice: Undefined variable: Information in c:\apache\htdocs\docs\db.php on line 19
Notice: Undefined variable: Comentario in c:\apache\htdocs\docs\db.php on line 19
_______________________________________________
and on button click of the query send error =;
Forbidden
You don't have permission to access /docs/< on this server.
This is where my center.php = located ( <iframe >)[/php_man]