par
numix » 09 août 2011, 13:34
Les accolade me paraissent pourtant correctement positionné !
Bon, je met mon code complet et si une âme charitable veut bien prendre le temps de l'étudier pour me dire d'ou vient le probleme :
<?php require_once('Connections/csonjob.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$colname_verifmail = "-1";
if (isset($_POST['email'])) {
$colname_verifmail = $_POST['email'];
}
mysql_select_db($database_csonjob, $csonjob);
$query_verifmail = sprintf("SELECT email FROM clients WHERE email = %s", GetSQLValueString($colname_verifmail, "text"));
$verifmail = mysql_query($query_verifmail, $csonjob) or die(mysql_error());
$row_verifmail = mysql_fetch_assoc($verifmail);
$totalRows_verifmail = mysql_num_rows($verifmail);
?>
<?php include 'header.php'; ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" class="textebleu">
<table width="100%" border="0" cellspacing="0" cellpadding="20">
<tr>
<td width="50%" align="center" valign="top"><?php // Show if recordset empty
if ($totalRows_verifmail == 0)
{ // Show if recordset empty
//récupération des valeurs du champ email
$email = $_POST["email"] ;
//création de la requête SQL:
$sql = "INSERT INTO clients (email)
VALUES ( '$email') " ;
//exécution de la requête SQL:
$requete = mysql_query($sql, $csonjob) or die( mysql_error() ) ;
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="15" background="images/tab2_hg.png"></td>
<td height="15" background="images/tab2_h.png"></td>
<td height="15" background="images/tab2_hd.png"></td>
</tr>
<tr>
<td width="15" background="images/tab2_g.png"></td>
<td align="center" valign="top"><p class="titrebleu"><img src="images/dequelpro.png" width="317" height="60" /></p>
<p class="titrebleu"><span class="textebleu">Un Email contenant vos identifiants de connexion<br />
vient de vous être envoyé à l'adresse suivante : </span><?php echo $_POST['email']; ?></p>
<p class="titrebleu"><span class="textebleu"><br />
</span></p></td>
<td width="15" background="images/tab2_d.png"></td>
</tr>
<tr>
<td height="15" background="images/tab2_bg.png"></td>
<td height="15" background="images/tab2_b.png"></td>
<td height="15" background="images/tab2_bd.png"></td>
</tr>
</table>
<?php } else { // Show if recordset empty ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="15" background="images/tab2_hg.png"></td>
<td height="15" background="images/tab2_h.png"></td>
<td height="15" background="images/tab2_hd.png"></td>
</tr>
<tr>
<td width="15" background="images/tab2_g.png"></td>
<td align="center" valign="top"><p class="titrebleu"><img src="images/dequelpro.png" width="317" height="60" /></p>
<p class="titrebleu"><span class="textebleu">Cette adresse existe déja dans notre base de données !<br />
<br />
Un Email de rappel contenant vos identifiants de connexion<br />
vient de vous être envoyé à l'adresse suivante :</span> <?php echo $_POST['email']; ?></p>
<p class="titrebleu"><br />
</p></td>
<td width="15" background="images/tab2_d.png"></td>
</tr>
<tr>
<td height="15" background="images/tab2_bg.png"></td>
<td height="15" background="images/tab2_b.png"></td>
<td height="15" background="images/tab2_bd.png"></td>
</tr>
</table><?php } ?>
<p> </p></td>
</tr>
</table>
<p class="titrebleu"><br />
</p>
<p class="titrebleu"> </p>
<p> </p>
<p> </p>
<p> </p></td>
<td> </td>
</tr>
</table>
<?php
mysql_free_result($verifmail);
?>
<?php include 'footer.php'; ?>
Les accolade me paraissent pourtant correctement positionné !
Bon, je met mon code complet et si une âme charitable veut bien prendre le temps de l'étudier pour me dire d'ou vient le probleme :
[php]<?php require_once('Connections/csonjob.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$colname_verifmail = "-1";
if (isset($_POST['email'])) {
$colname_verifmail = $_POST['email'];
}
mysql_select_db($database_csonjob, $csonjob);
$query_verifmail = sprintf("SELECT email FROM clients WHERE email = %s", GetSQLValueString($colname_verifmail, "text"));
$verifmail = mysql_query($query_verifmail, $csonjob) or die(mysql_error());
$row_verifmail = mysql_fetch_assoc($verifmail);
$totalRows_verifmail = mysql_num_rows($verifmail);
?>
<?php include 'header.php'; ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" class="textebleu">
<table width="100%" border="0" cellspacing="0" cellpadding="20">
<tr>
<td width="50%" align="center" valign="top"><?php // Show if recordset empty
if ($totalRows_verifmail == 0)
{ // Show if recordset empty
//récupération des valeurs du champ email
$email = $_POST["email"] ;
//création de la requête SQL:
$sql = "INSERT INTO clients (email)
VALUES ( '$email') " ;
//exécution de la requête SQL:
$requete = mysql_query($sql, $csonjob) or die( mysql_error() ) ;
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="15" background="images/tab2_hg.png"></td>
<td height="15" background="images/tab2_h.png"></td>
<td height="15" background="images/tab2_hd.png"></td>
</tr>
<tr>
<td width="15" background="images/tab2_g.png"></td>
<td align="center" valign="top"><p class="titrebleu"><img src="images/dequelpro.png" width="317" height="60" /></p>
<p class="titrebleu"><span class="textebleu">Un Email contenant vos identifiants de connexion<br />
vient de vous être envoyé à l'adresse suivante : </span><?php echo $_POST['email']; ?></p>
<p class="titrebleu"><span class="textebleu"><br />
</span></p></td>
<td width="15" background="images/tab2_d.png"></td>
</tr>
<tr>
<td height="15" background="images/tab2_bg.png"></td>
<td height="15" background="images/tab2_b.png"></td>
<td height="15" background="images/tab2_bd.png"></td>
</tr>
</table>
<?php } else { // Show if recordset empty ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="15" background="images/tab2_hg.png"></td>
<td height="15" background="images/tab2_h.png"></td>
<td height="15" background="images/tab2_hd.png"></td>
</tr>
<tr>
<td width="15" background="images/tab2_g.png"></td>
<td align="center" valign="top"><p class="titrebleu"><img src="images/dequelpro.png" width="317" height="60" /></p>
<p class="titrebleu"><span class="textebleu">Cette adresse existe déja dans notre base de données !<br />
<br />
Un Email de rappel contenant vos identifiants de connexion<br />
vient de vous être envoyé à l'adresse suivante :</span> <?php echo $_POST['email']; ?></p>
<p class="titrebleu"><br />
</p></td>
<td width="15" background="images/tab2_d.png"></td>
</tr>
<tr>
<td height="15" background="images/tab2_bg.png"></td>
<td height="15" background="images/tab2_b.png"></td>
<td height="15" background="images/tab2_bd.png"></td>
</tr>
</table><?php } ?>
<p> </p></td>
</tr>
</table>
<p class="titrebleu"><br />
</p>
<p class="titrebleu"> </p>
<p> </p>
<p> </p>
<p> </p></td>
<td> </td>
</tr>
</table>
<?php
mysql_free_result($verifmail);
?>
<?php include 'footer.php'; ?>
[/php]