Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Bypass errors.php for separate tables

Asked Modified Viewed 5,976 times
Q
Quartzkyte
Q
www.php-fusion.co.uk/../../images/smiley/cool.gif

Mike
---------------------------------------
Quartzkyte, admin @ French N.S.S.
  • Senior Member, joined since
  • Contributed 404 posts on the community forums.
  • Started 40 threads in the forums
  • Started this discussions
asked
Senior Member

Hi all,

One of my sites has a form in a custom page, sending data to MySQL tables in the same DB but not with the Fusion prefix[size=12] (one of the major reasons being they are saved separately from the rest of the PHPFusion tables and re-used otu of the Fusion environment)[/size].

Environment :
PHP : 5.2.17
MySQL : 5.1.49
Fusion : v7.02.03

The system works perfectly, stores data and sends some via e-mail, etc.

Problem : each field makes an "unknown type" error in the new errors handling of PHPFusion[size=12] as the form fields are obviously not in the Fusion tables[/size]...

How can I bypass this, or disable error handling after the site is setup (as other Fusion pages do not generate errors) ?

Thank you guys...
0 replies

13 posts

A
Ankur
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
answered
Veteran Member

Can you post more details about the ERROR you get ?

A Screenshot will be nice... ;)
0 replies
Q
Quartzkyte
Q
www.php-fusion.co.uk/../../images/smiley/cool.gif

Mike
---------------------------------------
Quartzkyte, admin @ French N.S.S.
  • Senior Member, joined since
  • Contributed 404 posts on the community forums.
  • Started 40 threads in the forums
  • Started this discussions
answered
Senior Member

Thank you for your reply.

I erased everything but as soon as someone use the form I'll do it.

The type of errors is something like
[syntaxhighlighter brush=sql,first-line=1,highlight=0,collapse=false,html-script=false]INSERT INTO fusionxxxprefixxx (error_id,error_level,error_message,error_file,error_line,error_page,error_user_level,error_user_ip,error_user_ip_type,error_status,error_timestamp) VALUES ('2192','8','Undefined index: qualite','/vdir/www.mysite.com/var/www/vhosts/www.mysite.com/web/viewpage.php(35) : eval()'d code','5','/viewpage.php','0','xxx.ip.address.xxx','4','0','1311955732'wink;[/syntaxhighlighter]

(from a previous dump)

The qualite field is used in the custom form...
0 replies
A
Ankur
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
answered
Veteran Member

That is an Error in your Coding then... If you will try to use it alone, even then you may get that error in your PHP log... B)

So better look at the form code... or posts here if we find the error in it ;)
0 replies
Q
Quartzkyte
Q
www.php-fusion.co.uk/../../images/smiley/cool.gif

Mike
---------------------------------------
Quartzkyte, admin @ French N.S.S.
  • Senior Member, joined since
  • Contributed 404 posts on the community forums.
  • Started 40 threads in the forums
  • Started this discussions
answered
Senior Member

OK, if you have time for it...

Request page :

<?php
$ip = $_SERVER['REMOTE_ADDR'];
?>
<link href='extras/extras.css' rel='stylesheet' type='text/css' />
<center>
 <form method='post' action='viewpage.php?page_id=7'>
**cutting HTML description text here; there is also a captcha call below (img_cookie.php)**
<hr />
 <p> Afin d'&eacute;viter les spams, robots et virus,<br />
 merci de recopier uniquement en chiffres et MAJuscules<br />
 le code <img src='img_cookie.php' alt='Code' align='absmiddle' />dans cette case =&gt;
 <input type='text' name='secret' size='6' maxlength='5' />
 </p>
 <hr />
 <p> <b>Coordonn&eacute;es :</b> <br/>
 <input type='radio' name='qualite' value='Mme' checked='checked' />
 Madame
 <input type='radio' name='qualite' value='Mle' />
 Mademoiselle
 <input type='radio' name='qualite' value='M.' />
 Monsieur &nbsp;(cochez la bonne case) <br/>
 Nom :<br/>
 <textarea name='nom' cols='50' rows='2' wrap='virtual' id='nom'></textarea>
 <br />
 Pr&eacute;nom :<br/>
 <textarea name='prenom' cols='50' rows='2' wrap='virtual' id='prenom'></textarea>
 <br />
 Adresse postale :<br />
 <textarea name='postale' cols='50' rows='5' wrap='virtual' id='postale'></textarea>
 <br />
 T&eacute;l&eacute;phone (journ&eacute;e) <br />
 Si vous n'&ecirc;tes pas en France, entrez simplement<br />
 code pays, code ville et n&deg; (pas de 00 ou de +) <br />
 <textarea name='telephone' cols='50' rows='2' id='telephone'></textarea>
 <br />
 Téléphone mobile <br />
 Si vous n'&ecirc;tes pas en France, entrez simplement<br />
 code pays, code ville et n&deg; (pas de 00 ou de +) <br />
 <textarea name='mobile' cols='50' rows='2' id='telephone'></textarea>
 <br />
 T&eacute;l&eacute;copie<br/>
 Si vous n'&ecirc;tes pas en France, entrez simplement<br />
 code pays, code ville et n&deg; (pas de 00 ou de +) <br/>
 <textarea name='fax' cols='50' rows='2' id='fax'></textarea>
 <br />
 E-mail :<br />
 <textarea name='email' cols='50' rows='2' id='email'></textarea>
 <br />
 Pr&eacute;f&eacute;rence de courrier-r&eacute;ponse :<br />
 <input type='radio' name='preference' value='E-Mail' checked='checked' />
 E-mail
 <input type='radio' name='preference' value='Fax' />
 Fax
 <input type='radio' name='preference' value='Courrier Postal' />
 Courrier Postal<br />
 <br />
Pr&eacute;f&eacute;rences :
 <spansmall>
 <br/>
 Vos r&eacute;gions souhait&eacute;es<br />
 et votre itin&eacute;raire si vous l'avez d&eacute;j&agrave; d&eacute;fini : <br/>
 <textarea name='itineraire' cols='50' rows='10' wrap='virtual'></textarea>
 <br />
 Priorit&eacute;s et centres d'int&eacute;r&ecirc;t :
 <spansmall>
 <br/>
 villes, mer, Parcs Nationaux, d&eacute;serts, attractions,<br />
 randonn&eacute;es, excursions, sports... <br/>
 <textarea name='priorites' cols='50' rows='10' wrap='virtual' id='priorites'></textarea>
 <br />
 <b>Dates du voyage au format JJ/MM/AAAA :</b><br />
 Date de d&eacute;part :</p>
 <p>
 <textarea name='date_depart' cols='50' rows='2' id='date_depart'></textarea>
 </p>
 <p>Date de retour :<br />
 <textarea name='date_retour' cols='50' rows='2' id='date_retour'></textarea>
 </p>
 <p>Autres dates possibles :<br/>
 <textarea name='autres_dates' cols='50' rows='2' id='autres_dates'></textarea>
 <br />
 Ville de d&eacute;part et de retour :<br/>
 <textarea name='ville_depart' cols='50' rows='2' id='ville_depart'></textarea>
 <br /><b>Voyageurs :</b><br />
 NOMS, Pr&eacute;noms et Dates de Naissance<br />tels qu'indiqu&eacute;s sur les passeports. <br />Femmes mari&eacute;es : <a href='news.php?readmore=19' >NOM DE JEUNE FILLE</a> suivi du NOM D'EPOUSE)<br />Exemple : DURAND &eacute;pouse DUPOND, C&eacute;line, 22DEC1980<br />1 seul passager par ligne<br />
<br/>
 <textarea name='noms_pax' cols='50' rows='15' wrap='virtual' id='noms_pax'></textarea>
 <br />
 <b>H&eacute;bergement :<br/>
 </b> Nombre de chambres : <br/>
 <textarea name='nb_chambres' cols='50' rows='2' id='nb_chambres'></textarea>
 <br />
 Cat&eacute;gorie de Logement (ou &eacute;quivalent Europe) :<br/>
 <select name='categorie_hot' size='1' id='categorie_hot'>
 <option value='2 &eacute;toiles' selected='selected'>2 &eacute;toiles</option>
 <option value='3 &eacute;toiles'>3 &eacute;toiles</option>
 <option value='4 &eacute;toiles'>4 &eacute;toiles</option>
 <option value='5 &eacute;toiles'>5 &eacute;toiles</option>
 </select>
 Type :
 <select name='type_hot' size='1' id='type_hot'>
 <option value='H&ocirc;tels' selected='selected'>H&ocirc;tels</option>
 <option value='Motels'>Motels</option>
 <option value='Camping'>Camping</option>
 </select>
 <b><br />
 Voiture :<br />
 </b>Cat&eacute;gorie de voiture (ou &eacute;quivalent Europe) :<br/>
 <textarea name='categorie_voit' cols='50' rows='2' id='categorie_voit'></textarea>
 <br />
 Prise et rendue &agrave; :<br />
 <textarea name='ville_voit' cols='50' rows='2' id='ville_voit'></textarea>
 <br />
 <b>Camping-Car (motorhome) :</b><br />
 Cat&eacute;gorie :<br />
 <textarea name='cat_motorhome' cols='50' rows='2' id='cat_motorhome'></textarea>
 <br />
 Pris et rendu &agrave; :<br />
 <textarea name='vil_motorhome' cols='50' rows='2' id='vil_motorhome'></textarea>
 <br/>
 Budget approximatif :<br />
 <textarea name='budget' cols='50' rows='2' id='budget'></textarea>
 <br />
 Autres d&eacute;tails &amp; commentaires :<br />
 <textarea name='comments' cols='50' rows='10' wrap='virtual' id='comments'></textarea>
 <br />
 Comment nous avez-vous connus ? <br/>
 <textarea name='provenance' cols='50' rows='2' id='provenance'></textarea>
 <input name='ip' type='hidden' id='ip' value='<?=$ip?>'/>
 </p>
 <div align='center'>
 <p>
 <input name='reset' type='reset' value='Effacer'/>
 <img src='images/spacer.gif' width='20' height='15' />
 <input type='submit' name='Envoyer' value=' Envoyer ! '/>
 </p>
 </div>
 </form>
</center>

and the return page...

<?php
$code = $_COOKIE["code"];
//
   $secret = trim($_POST['secret']);
   $qualite = trim($_POST['qualite']);
   $nom = trim($_POST['nom']);
   $prenom = trim($_POST['prenom']);
   $postale = trim($_POST['postale']);
   $telephone = trim($_POST['telephone']);
   $mobile = trim($_POST['mobile']);
   $fax = trim($_POST['fax']);
   $email = trim($_POST['email']);
   $date_depart = trim($_POST['date_depart']);
   $date_retour = trim($_POST['date_retour']);
   $budget = trim($_POST['budget']);
   $preference = trim($_POST['preference']);
   $itineraire = trim($_POST['itineraire']);
   $priorites = trim($_POST['priorites']);
   $date_depart = trim($_POST['date_depart']);
   $date_retour = trim($_POST['date_retour']);
   $autres_dates = trim($_POST['autres_dates']);
   $ville_depart = trim($_POST['ville_depart']);
   $noms_pax = trim($_POST['noms_pax']);
   $nb_chambres = trim($_POST['nb_chambres']);
   $categorie_hot = trim($_POST['categorie_hot']);
   $type_hot = trim($_POST['type_hot']);
   $categorie_voit = trim($_POST['categorie_voit']);
   $ville_voit = trim($_POST['ville_voit']);
   $cat_motorhome = trim($_POST['cat_motorhome']);
   $vil_motorhome = trim($_POST['vil_motorhome']);
   $budget = trim($_POST['budget']);
   $comments = trim($_POST['comments']);
   $budget = trim($_POST['budget']);
   $provenance = trim($_POST['provenance']);
   $ip = trim($_POST['ip']);

   if (empty($nom))
   {
   echo ('<div align="center" class="usabd">Une erreur s\'est produite :<br /><br />Le champ &quot;Nom&quot; n\'est pas rempli.<br /><a href="javascript:history.go(-1)">Cliquez ici pour corriger.</a><br /></div>');
   }

   elseif (empty($prenom))
   {
   echo ('<div align="center" class="usabd">Une erreur s\'est produite :<br /><br />Le champ &quot;Pr&eacute;nom&quot; n\'est pas rempli.<br /><a href="javascript:history.go(-1)">Cliquez ici pour corriger.</a><br /></div>');
   }

   elseif (empty($postale))
   {
   echo ('<div align="center" class="usabd">Une erreur s\'est produite :<br /><br />Le champ &quot;Adresse&quot; n\'est pas rempli.<br /><a href="javascript:history.go(-1)">Cliquez ici pour corriger.</a><br /></div>');
   }

   elseif (empty($telephone))
   {
   echo ('<div align="center" class="usabd">Une erreur s\'est produite :<br /><br />Le champ &quot;T&eacute;l&eacute;phone&quot; n\'est pas rempli.<br /><a href="javascript:history.go(-1)">Cliquez ici pour corriger.</a><br /></div>');
   }

   elseif (!preg_match("'[0-9]{10,14}'", $telephone))
   {
   echo ('<div align="center" class="usabd">Une erreur s\'est produite :<br /><br />Le champ &quot;T&eacute;l&eacute;phone&quot; n\'est pas conforme.<br /><a href="javascript:history.go(-1)">Cliquez ici pour corriger.</a><br /></div>');
   }

   elseif ((!empty($mobile)) && (!preg_match("'[0-9]{10,14}'", $mobile)))
   {
   echo ('<div align="center" class="usabd">Une erreur s\'est produite :<br /><br />Le champ &quot;Portable&quot; n\'est pas conforme.<br /><a href="javascript:history.go(-1)">Cliquez ici pour corriger.</a><br /></div>');
   }
   
   elseif (empty($email))
   {
   echo ('<div align="center" class="usabd">Une erreur s\'est produite :<br /><br />L\'adresse email est vide.<br /><a href="javascript:history.go(-1)">Cliquez ici pour corriger.</a><br /></div>');
   }

   elseif (!preg_match("!^[a-z0-9._-]+@[a-z0-9._-]{2,}\.[a-z]{2,4}$!", $email))
   {
   echo ('<div align="center" class="usabd">Une erreur s\'est produite :<br /><br />L\'adresse mail : ' . $_POST['email'] . ' n\'est pas valide ou comporte des MAJuscules.<br /><a href="javascript:history.go(-1)">Cliquez ici pour corriger.</a><br /></div>');
   }

   elseif (empty($date_depart))
   {
   echo ('<div align="center" class="usabd">Une erreur s\'est produite :<br /><br />Le champ &quot;Date de d&eacute;part&quot; n\'est pas rempli.<br /><a href="javascript:history.go(-1)">Cliquez ici pour corriger.</a><br /></div>');
   }
   
   elseif ( $result == false )
   {
   echo ('<div align="center" class="usabd">Une erreur s\'est produite :<br /><br />Le champ &quot;Date de d&eacute;part&quot; n\'est pas VALIDE.<br /><a href="javascript:history.go(-1)">Cliquez ici pour corriger.</a><br /></div>');
   }

   elseif (empty($budget))
   {
   echo ('<div align="center" class="usabd">Une erreur s\'est produite :<br /><br />Le champ &quot;budget&quot; n\'est pas rempli.<br /><a href="javascript:history.go(-1)">Cliquez ici pour corriger.</a><br /></div>');
   }

elseif ($secret == $code)
{

 // Creation de la table
$jourfr = array (
"Monday" => "Lundi",
"Tuesday" => "Mardi",
"Wednesday" => "Mercredi",
"Thursday" => "Jeudi",
"Friday" => "Vendredi",
"Saturday" => "Samedi",
"Sunday" => "Dimanche",
"January" => "janvier",
"February" => "février",
"March" => "mars",
"April" => "avril",
"May" => "mai",
"June" => "juin",
"July" => "juillet",
"August" => "août",
"September" => "septembre",
"October" => "octobre",
"November" => "novembre",
"December" => "décembre"
);
$jour=$jourfr[date('l')]; //Jour de la semaine en français (Monday => Lundi)
$mois=$jourfr[date('F')]; //Mois en français (June => juin)
$date_envoi = $jour . ' ' . date('d') . ' ' . $mois . ' '.date('Y') ; //Affichage de la date pour texte
$date_tri = date('y/m/d') ; //Affichage de la date pour texte
$nomstrip = stripslashes ($nom);
$adresse = 'devis@myemail.net';

$sujet = $date_tri . '- de '. $email . ' ('. $qualite .' ' . stripslashes($nom) . ') , le ' . $date_envoi . ', depuis le site';
$corps = stripslashes(
  "Qualité : ". $qualite .
  "\n" . "Nom : ". $nom .
  "\n" . "Prénom : ". $prenom .
  "\n" . "Adresse : ".$postale.
  "\n" . "Téléphone : ". $telephone .
  "\n" . "Portable : ". $mobile .
  "\n" . "Fax : ". $fax .
  "\n" . "E-Mail : ". $email .   "\n" .
  "\n" . "Préférences : ". $preference .
  "\n" . "Itinéraire : ". $itineraire .
  "\n" . "Priorités : ". $priorites .
  "\n" . "Date de Départ : ". $date_depart .
  "\n" . "Date de Retour : ". $date_retour .
  "\n" . "Autres dates possibles : ". $autres_dates .
  "\n" . "Ville de Départ : ". $ville_depart .   "\n" .
  "\n" . "Noms des Passagers : ". $noms_pax . "\n" .
  "\n" . "Nombre de Chambres : ". $nb_chambres .
  "\n" . "Catégorie : ". $categorie_hot .
  "\n" . "Types de Chambres : ". $type_hot .   "\n" .
  "\n" . "Catégorie de Voiture : ". $categorie_voit .
  "\n" . "Prise et Rendue : ". $ville_voit . "\n" .
  "\n" . "Catégorie de Motorhome : ". $cat_motorhome .
  "\n" . "Pris et Rendu : ". $vil_motorhome . "\n" .
  "\n" . "Budget : ". $budget . "\n" .
  "\n" . "Commentaires : ". $comments.   "\n" .
  "\n" . "Nous a connus par : ". $provenance.
  "\n" . "Adresse I.P. du visiteur : ". $ip
         );

   $headers = 'Bcc: devis2@gmail.com';
   mail($adresse, $sujet, $corps, $headers);

$nom1=addslashes($nom);
$postale1=addslashes($postale);
$preference1=addslashes($preference);
$itineraire1=addslashes($itineraire);
$priorites1=addslashes($priorites);
$ville_depart1=addslashes($ville_depart);
$noms_pax1=addslashes($noms_pax);
$ville_voit1=addslashes($ville_voit);
$comments1=addslashes($comments);
$provenance1=addslashes($provenance);
      
      mysql_select_db("mydbname") or die(mysql_error()); // Sélection de la base

      $sql = "INSERT INTO visiteurs (id, qualite, nom, prenom, postale, telephone, mobile, fax, email, preference, itineraire, priorites, date_depart, date_retour, autres_dates, ville_depart, noms_pax, categorie_hot, type_hot, ville_voit, cat_motorhome, vil_motorhome, budget, comments, provenance, ip, date_tri) VALUES('', '$qualite', '$nom1', '$prenom', '$postale1', '$telephone', '$mobile', '$fax', '$email', '$preference1', '$itineraire1', '$priorites1', '$date_depart', '$date_retour', '$autres_dates', '$ville_depart1', '$noms_pax1', '$categorie_hot', '$type_hot', '$ville_voit1', '$cat_motorhome', '$vil_motorhome', '$budget', '$comments1', '$provenance1', '$ip', '$date_tri')";
      
      mysql_query($sql) or die('Erreur SQL !'.$sql.'<br>'.mysql_error());
      
      echo ('<div align="center">Merci, '. $qualite . ' ' . $nomstrip. '.<br />Nous vous répondrons rapidement. <br />Vous avez transmis les donn&eacute;es suivantes :<p align="left">Adresse :<b> '. $postale. '</b><br />T&eacute;l&eacute;phone :<b> '. $telephone .'</b><br />Portable :<b> '. $mobile .'</b><br />Fax :<b> '. $fax . '</b><br />E-Mail :<b> '. $email . '</b><br /><br />Pr&eacute;f&eacute;rences :<b> '. $preference .'</b><br />Itin&eacute;raire :<b> '. $itineraire .'</b><br />Priorit&eacute;s :<b> '. $priorites .'</b><br /><br />Date de D&eacute;part :<b> '. $date_depart .'</b><br />Date de Retour :<b> '. $date_retour .'</b><br />Autres dates possibles :<b> '. $autres_dates .'</b><br />Ville de D&eacute;part :<b> '. $ville_depart . '</b><br />Noms des Passagers :<b> '. $noms_pax . '</b><br />Nombre de Chambres :<b> '. $nb_chambres .'</b><br />Cat&eacute;gorie :<b> '. $categorie_hot .'</b><br />Types de Chambres :<b> '. $type_hot . '</b><br /><br />Cat&eacute;gorie de Voiture :<b> '. $categorie_voit .'</b><br />Prise et Rendue :<b> '. $ville_voit . '</b><br />Cat&eacute;gorie de Motorhome :<b> '. $cat_motorhome .'</b><br />Pris et Rendu :<b> '. $vil_motorhome . '</b><br /><br />Budget :<b> '. $budget . '</b><br /><br />Commentaires :<b> '. $comments. '</b><br />Nous a connus par :<b> '. $provenance.'</p><a href="#" onclick="window.print(); return false;">Imprimer cette page</a></div>');

   setcookie('code');
}
else
{
   echo ('<div align="center">ERREUR.<br />Le code de validation entr&eacute; n\'est pas valide.<br /><br /><a href="javascript:history.go(-1)">Rectifier.</a><br /></div>');
}
?>
Edited by Quartzkyte on 03-08-2011 13:44,
0 replies
A
Ankur
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
answered
Veteran Member

Try changing this Line in your return page :
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]$qualite = trim($_POST['qualite']);[/syntaxhighlighter]
to :
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]$qualite = (isset($_POST['qualite']) ? trim($_POST['qualite']) : ""wink;[/syntaxhighlighter]
then clear the Errors and try it ! And let us know if it works.
0 replies
Q
Quartzkyte
Q
www.php-fusion.co.uk/../../images/smiley/cool.gif

Mike
---------------------------------------
Quartzkyte, admin @ French N.S.S.
  • Senior Member, joined since
  • Contributed 404 posts on the community forums.
  • Started 40 threads in the forums
  • Started this discussions
answered
Senior Member

Thank you, it seems no more error for this variable.

I'm not sure I understand the difference between what you corrected and what I did, but
can I apply the same "recipe" to the rest of the variables?

TY again.
0 replies
A
Ankur
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
answered
Veteran Member

You are Welcome :)

Apply this only to Radio Buttons and Check Boxes. Because when they are not selected, they send nothing to the variable. B)
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

Excuse me if I am wrong but doesn't this all need stripinput as well as trim?? For security!!!

$secret = stripinput(trim($_POST['secret']));


<?php
$code = $_COOKIE["code"];
//
   $secret = trim($_POST['secret']);
   $qualite = trim($_POST['qualite']);
   $nom = trim($_POST['nom']);
   $prenom = trim($_POST['prenom']);
   $postale = trim($_POST['postale']);
   $telephone = trim($_POST['telephone']);
   $mobile = trim($_POST['mobile']);
   $fax = trim($_POST['fax']);
   $email = trim($_POST['email']);
   $date_depart = trim($_POST['date_depart']);
   $date_retour = trim($_POST['date_retour']);
   $budget = trim($_POST['budget']);
   $preference = trim($_POST['preference']);
   $itineraire = trim($_POST['itineraire']);
   $priorites = trim($_POST['priorites']);
   $date_depart = trim($_POST['date_depart']);
   $date_retour = trim($_POST['date_retour']);
   $autres_dates = trim($_POST['autres_dates']);
   $ville_depart = trim($_POST['ville_depart']);
   $noms_pax = trim($_POST['noms_pax']);
   $nb_chambres = trim($_POST['nb_chambres']);
   $categorie_hot = trim($_POST['categorie_hot']);
   $type_hot = trim($_POST['type_hot']);
   $categorie_voit = trim($_POST['categorie_voit']);
   $ville_voit = trim($_POST['ville_voit']);
   $cat_motorhome = trim($_POST['cat_motorhome']);
   $vil_motorhome = trim($_POST['vil_motorhome']);
   $budget = trim($_POST['budget']);
   $comments = trim($_POST['comments']);
   $budget = trim($_POST['budget']);
   $provenance = trim($_POST['provenance']);
   $ip = trim($_POST['ip']);
0 replies
A
Ankur
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
answered
Veteran Member

Yeah... You are right... :)

But that is not my Code... And yeah... well done... hey you must follow Fangree... to prevent vulnerabilities... ;)
0 replies
Q
Quartzkyte
Q
www.php-fusion.co.uk/../../images/smiley/cool.gif

Mike
---------------------------------------
Quartzkyte, admin @ French N.S.S.
  • Senior Member, joined since
  • Contributed 404 posts on the community forums.
  • Started 40 threads in the forums
  • Started this discussions
answered
Senior Member

OK, will do.
Thanks, Craig, BTW.

Another bunch of errors from another request:

web/viewpage.php(35) : eval()'d code
Undefined index: depyear Ligne : 6

web/viewpage.php(35) : eval()'d code
Undefined index: depmonth Ligne : 5

web/viewpage.php(35) : eval()'d code
Undefined index: depday Ligne : 4

web/viewpage.php(35) : eval()'d code
Undefined index: Nombre Ligne : 3

But these are neither radio nor check boxes... B)
0 replies
A
Ankur
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
answered
Veteran Member

Quote

Quartzkyte wrote:

Undefined index: depyear Ligne : 6
Undefined index: depmonth Ligne : 5
Undefined index: depday Ligne : 4
Undefined index: Nombre Ligne : 3


I cannot find any of these variables in your code :(
0 replies
Q
Quartzkyte
Q
www.php-fusion.co.uk/../../images/smiley/cool.gif

Mike
---------------------------------------
Quartzkyte, admin @ French N.S.S.
  • Senior Member, joined since
  • Contributed 404 posts on the community forums.
  • Started 40 threads in the forums
  • Started this discussions
answered
Senior Member

You're right. I recognize those from previous attempts but cannot find them ATM.
This helped anyway!
I have to get afk for a moment, I don't see clearly... :)

Edit : I have another form, etc...

The ones below do come from the above :
web/viewpage.php(35) : eval()'d code
Undefined index: prenom Ligne : 7
web/viewpage.php(35) : eval()'d code
Undefined index: postale Ligne : 8
web/viewpage.php(35) : eval()'d code
Undefined index: telephone Ligne : 9
web/viewpage.php(35) : eval()'d code
Undefined index: mobile Ligne : 10
web/viewpage.php(35) : eval()'d code
Undefined index: fax Ligne : 11
web/viewpage.php(35) : eval()'d code
Undefined index: email Ligne : 12
web/viewpage.php(35) : eval()'d code
Undefined index: preference Ligne : 13
web/viewpage.php(35) : eval()'d code
Undefined index: itineraire Ligne : 14
web/viewpage.php(35) : eval()'d code
Undefined index: priorites Ligne : 15
web/viewpage.php(35) : eval()'d code
Undefined index: date_depart Ligne : 16
web/viewpage.php(35) : eval()'d code
Undefined index: date_retour Ligne : 17
web/viewpage.php(35) : eval()'d code
Undefined index: autres_dates Ligne : 18
web/viewpage.php(35) : eval()'d code
Undefined index: ville_depart Ligne : 19
web/viewpage.php(35) : eval()'d code
Undefined index: noms_pax Ligne : 20
web/viewpage.php(35) : eval()'d code
Undefined index: nb_chambres Ligne : 21
web/viewpage.php(35) : eval()'d code
Undefined index: categorie_hot Ligne : 22
web/viewpage.php(35) : eval()'d code
Undefined index: type_hot Ligne : 23
web/viewpage.php(35) : eval()'d code
Undefined index: categorie_voit Ligne : 24
web/viewpage.php(35) : eval()'d code
Undefined index: ville_voit Ligne : 25

...
I have already 4 new pages of those!
Edited by Quartzkyte on 03-08-2011 16:20,
0 replies
M
Matonor
M
Impossible things are there to be made possible
  • Veteran Member, joined since
  • Contributed 1,022 posts on the community forums.
  • Started 3 threads in the forums
answered
Veteran Member

This happens, because the above code is executed when no form is sent es well, thus rendering the POST-Array empty.
Top avoid checking for every single entry, you could wrap the whole form handling code in a
if(!empty($_POST)){
//Form Handling
}

or better yet you could check if that specific form was submitted using:
if(isset($_POST['Envoyer']) && !empty($_POST['Envoyer'])){
//Form Handling
}
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 13 posts
  • Votes 0 votes
  • Topic users 4 members

4 participants

M
M
Impossible things are there to be made possible
  • Veteran Member, joined since
  • Contributed 1,022 posts on the community forums.
  • Started 3 threads in the forums
C
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
Q
Q
www.php-fusion.co.uk/../../images/smiley/cool.gif

Mike
---------------------------------------
Quartzkyte, admin @ French N.S.S.
  • Senior Member, joined since
  • Contributed 404 posts on the community forums.
  • Started 40 threads in the forums
  • Started this discussions
A
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet