ziedinjsh Posted January 30, 2011 Report Share Posted January 30, 2011 Sveiki! Vēlos uztaisīt rģistrēšanos iekš popup. It kā esmu uztaisījis jau, bet ir tāda lieta, ka reģistrējas neparādas nekādi uzraksti.. tie ir redzami pēc tam kad atkāroti atver popup. Laikam sanāk taisīt kad spiežot pogu infromācija ievietojas datubāzē bez lapas pārlādēšanas un arī izmet informāciju vai reģistrācija ir izdevusies vai nav! Kur varētu ko tādu iegūt!? varbūt ir kāds vienkārš pliks kods kuru varētu izmantot? Paldies jauiepriekš! Quote Link to comment Share on other sites More sharing options...
daGrevis Posted January 30, 2011 Report Share Posted January 30, 2011 jQuery Fancybox + jQuery AJAX. Neko nevaru palīdzēt, jo nemāku zīlēt (t.i., nav dots Tavs pašreizējais kods). Quote Link to comment Share on other sites More sharing options...
ziedinjsh Posted January 30, 2011 Author Report Share Posted January 30, 2011 register.php <?php error_reporting(E_ALL); include "header.php"; include "fcs/dbase.php"; include "lang/lv.php"; echo "<div id='blanket' style='display:none;'></div>"; echo "<div id='popUpDiv' style='display:none;'>"; echo "<div class='content'>"; echo "<form method='post' action='fcs/reg.php' autocomplete='off'>"; echo "<span class='error' style='display:none'> Please Enter Valid Data</span>"; echo "<span class='success' style='display:none'> Registration Successfully</span>"; echo "<input type='text' name='user_name' id='user_name'/>"; echo "<input type='text' name='user_email' id='user_email'/>"; echo "<input type='password' name='user_pass' id='user_pass'/>"; echo "<input type='password' name='user_pass2' id='user_pass2'/>"; echo "<input type='submit' name='register' value='".$lang['reg05']."' />"; echo "</form>"; echo "</div></div>"; echo "<input type='submit' value='register' onclick=\"popup('popUpDiv')\">"; ?> reg.php <?php include ("dbase.php"); $user_name = mysql_real_escape_string(trim($_POST['user_name'])); $user_email = mysql_real_escape_string($_POST['user_email']); $user_pass = md5($_POST['user_pass']); $user_date = date('y.m.d'); if ($_POST['user_pass'] != $_POST['user_pass2']) { echo "Paroles nesakriit"; } $add = "INSERT INTO users (user_name, user_email, user_pass, user_date) VALUES ('$user_name', '$user_email', '$user_pass', '$user_date')"; $result = mysql_query($add) or die(mysql_error()); if($result){ echo "All done!"; }else { echo "ERROR"; } echo "<div id='results'></div>"; ?> Quote Link to comment Share on other sites More sharing options...
briedis Posted January 30, 2011 Report Share Posted January 30, 2011 Kāda vella pēc kaut kas vispār būtu jāliek popupā, kaitina, ka kaut kādi logi lec ārā. 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.