Hi,
Im very new at PHP/MYSQL and this are my first steps to send data on to my DB. I dont have a clue why when I send the data to MYSQL there is nothing on the database but I don’t get any errors so Im lost ?
I will atatch my code and post my code.
and here is the code for the insertion of the data:
[B]insert_procesador.php
[code=php]<?php
// Coneccion a MYSQL
$host = “localhost”;
$user = “root”;
$pwd = “root”;
$dbConn = mysql_connect($host,$user,$pwd);
// Conectandose a la base de datos
//nombre del abase de datos:
$database = “newland_tours”;
mysql_select_db($database);
$query_rs_insert_news = “INSERT INTO tbl_news ( Title, Country, City, Date, 1d, 2e, 3es, 4f, 5i, 6p, 7o, deutch, english, espanol, francaise, italiano, portugues, otro, Picture1, Picture2, Picture3, Picture4, Picture5, Picture6, Picture7) VALUES (‘”.$_POST[‘Title’].”‘, ‘”.$_POST[‘Country’].”‘, ‘”.$_POST[‘City’].”‘, ‘”.$_POST[‘Date’].”‘, ‘”.$_POST[‘1d’].”‘, ‘”.$_POST[‘2e’].”‘, ‘”.$_POST[‘3es’].”‘, ‘”.$_POST[‘4f’].”‘, ‘”.$_POST[‘6p’].”‘, ‘”.$_POST[‘7o’].”‘, ‘”.$_POST[‘deutch’].”‘, ‘”.$_POST[‘english’].”‘, ‘”.$_POST[‘espanol’].”‘, ‘”.$_POST[‘francaise’].”‘, ‘”.$_POST[‘italiano’].”‘, ‘”.$_POST[‘portugues’].”‘, ‘”.$_POST[‘otro’].”‘, ‘”.$_POST[‘Picture1’].”‘, ‘”.$_POST[‘Picture2’].”‘,
‘”.$_POST[‘Picture3’].”‘,
‘”.$_POST[‘Picture4’].”‘,
‘”.$_POST[‘Picture5’].”‘,
‘”.$_POST[‘Picture6’].”‘,
‘”.$_POST[‘Picture7’].”‘
);”;
//$rs_insert_news = mysql_query($query_rs_insert_news);
//header(“Location: admin_cp_master.php”);
?>
[B]index.php
[code=php]
<?php
// Set up connection to MySQL
$host = “localhost”;
$user = “root”;
$pwd = “root”;
$dbConn = mysql_connect($host,$user,$pwd);
// Connect to newland_tours database
$database = “newland_tours”;
mysql_select_db($database);
$query_rs_news = “SELECT * FROM tbl_news ORDER BY Date”;
$rs_news = mysql_query($query_rs_news);
$row_rs_news = mysql_fetch_assoc($rs_news);
?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″ />
<title>Untitled Document</title>
</head>
<body>
<form name=”form1″ id=”form1″ method=”post” action=”insert_procesador.php”>
<table width=”485″ border=”0″ cellspacing=”0″ cellpadding=”5″>
<tr>
<td width=”156″>Title:</td>
<td width=”309″><input name=”Title” type=”text” id=”Title” /></td>
</tr>
<tr>
<td>Country:</td>
<td><input name=”Country” type=”text” id=”Country” /></td>
</tr>
<tr>
<td>City:</td>
<td><input name=”City” type=”text” id=”City” /></td>
</tr>
<tr>
<td>Date YYYY-MM-DD:</td>
<td><input name=”Date” type=”text” id=”Date” /></td>
</tr>
<tr>
<td>Language:</td>
<td> </td>
</tr>
<tr>
<td>1 deutsch :
<input name=”deutsch” type=”checkbox” id=”deutsch” value=”checkbox” /></td>
<td><textarea name=”1deutsch” cols=”50″ rows=”10″ id=”1deutsch”></textarea></td>
</tr>
<tr>
<td>2 english :
<input name=”english” type=”checkbox” id=”english” value=”checkbox” /></td>
<td><textarea name=”2 english” cols=”50″ rows=”10″ id=”2 english”></textarea></td>
</tr>
<tr>
<td>3 español :
<input name=”español” type=”checkbox” id=”español” value=”checkbox” /></td>
<td><textarea name=”3 espanol” cols=”50″ rows=”10″ id=”3 espanol”></textarea></td>
</tr>
<tr>
<td>4 française :
<input name=”française” type=”checkbox” id=”française” value=”checkbox” /></td>
<td><textarea name=”4 francaise” cols=”50″ rows=”10″ id=”4 francaise”></textarea></td>
</tr>
<tr>
<td>5 italiano:
<input name=”italiano” type=”checkbox” id=”italiano” value=”checkbox” /></td>
<td><textarea name=”5 italiano” cols=”50″ rows=”10″ id=”5 italiano”></textarea></td>
</tr>
<tr>
<td>6 português :
<input name=”português” type=”checkbox” id=”português” value=”checkbox” /></td>
<td><textarea name=”6 portugues” cols=”50″ rows=”10″ id=”6 portugues”></textarea></td>
</tr>
<tr>
<td>7 other :
<input name=”other” type=”checkbox” id=”other” value=”checkbox” /></td>
<td><textarea name=”7 other” cols=”50″ rows=”10″ id=”7 other”></textarea></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Pictures 1 </td>
<td><input name=”Pictures 1″ type=”text” id=”Pictures 1″ /></td>
</tr>
<tr>
<td>Pictures 2 </td>
<td><input name=”Pictures 2″ type=”text” id=”Pictures 2″ /></td>
</tr>
<tr>
<td>Pictures 3 </td>
<td><input name=”Pictures 3″ type=”text” id=”Pictures 3″ /></td>
</tr>
<tr>
<td>Pictures 4 </td>
<td><input name=”Pictures 4″ type=”text” id=”Pictures 4″ /></td>
</tr>
<tr>
<td>Pictures 5 </td>
<td><input name=”Pictures 5″ type=”text” id=”Pictures 5″ /></td>
</tr>
<tr>
<td>Pictures 6 </td>
<td><input name=”Pictures 6″ type=”text” id=”Pictures 6″ /></td>
</tr>
<tr>
<td>Pictures 7 </td>
<td><input name=”Pictures 7″ type=”text” id=”Pictures 7″ /></td>
</tr>
<tr>
<td> </td>
<td><input type=”submit” name=”Submit” value=”Submit” /></td>
</tr>
</table>
</form>
</body>
</html>
Thank you for any help
_Lobo
ps: the page is on my LOCALHOST with WAMP server the server works just fine and also the DB
[upl-file uuid=4bca9a34-9dd6-490e-bbe9-33fae9dc5d00 size=2kB]admin.zip