1 2 3 4 5 6 7 8 9 10 11 12 13
| <?php
$id_o = isset($_REQUEST['idoffre']) ? $_REQUEST['idoffre'] : '';
$id_c = isset($_REQUEST['id']) ? $_REQUEST['id'] : '';
mysql_connect("localhost","root","");
mysql_select_db("tmjob");
$sql=mysql_query("SELECT idoff,idc FROM candidature WHERE idoff=" . $id_o . " AND idc=" . $id_c . " ");
if(!$sql)echo "Error in query: ".mysql_error();
if(mysql_num_rows($result) > 0)
$sql=mysql_query("INSERT INTO candidature (idoff,idc) VALUES(" . $id_o . "," . $id_c . ")") ;
else
echo 0; // for incorrect login response
mysql_close();
?> |
Partager