Cibiņš Posted December 6, 2010 Report Share Posted December 6, 2010 (edited) Sveicināti domubiedri un kolēģi, lieta tāda ka man izmet: Notice: Undefined index: regemail in C:\fails.php on line 236 Itkā izdarīju visu ko vien varēju, pārbaudīju vai neatšķiras kaut kur mainīgie, pamēģinā ar issetiem, itkā visam būtu jābūt savās vietās bet tos draņķi tā arī neizdodas aizvākt :( Var kāds apgaismot kā lai aizvāc to Noticu?? fails.php 234. <?php 235. $newsreg = $_POST['regemail']; 236. $nwsreg = mysql_real_escape_string($newsreg); 237. $chkml = mysql_query("SELECT reg_mail FROM adm_reg_mails WHERE reg_mail='$nwsreg'"); 238. $eml_exist = mysql_num_rows($chkml); 239. if ($op == 'reg'){ 240. 241. if(!$nwsreg){ 242. $errormessage = "Ierakstiet e-pastu!"; 243. include forma.php'; 244. } 245. elseif(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $nwsreg)) { 246. if($eml_exist > 0){ 247. $errormessage = "Šāds e-pasts jau ir reģistrēts!"; 248. include 'forma.php'; 249. } else { 250. $errormessage = "Reģistrācija sekmīga!"; 251. mysql_query("INSERT INTO regemails (reg_mail, reg_date, reg_ip) VALUES ('$nwsreg', NOW(), '". $_SERVER['REMOTE_ADDR'] ."');") or die(mysql_error()); 252. include 'forma.php';}} 253. else { 254. $errormessage = "Nederīgs e-pasts!"; 255. include 'forma.php'; 256. }} 257. else { 258. include 'forma.php'; 259. } 260. ?> Edited December 6, 2010 by Cibiņš Quote Link to comment Share on other sites More sharing options...
mefisto Posted December 6, 2010 Report Share Posted December 6, 2010 $newsreg = isset($_POST['regemail']) ? $_POST['regemail'] : 'default value' ; Quote Link to comment Share on other sites More sharing options...
Jackal Posted December 6, 2010 Report Share Posted December 6, 2010 Kļūdas paziņojums nozīmē, ka iekš $_POST nav tāda atslēga regemail. Quote Link to comment Share on other sites More sharing options...
Cibiņš Posted December 6, 2010 Author Report Share Posted December 6, 2010 $newsreg = isset($_POST['regemail']) ? $_POST['regemail'] : 'default value' ; 3x cepumi Tev :) Viss bumbās :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.