Jump to content

pixeltrace

Members
  • Posts

    577
  • Joined

  • Last visited

    Never

Everything posted by pixeltrace

  1. this is the code for my form http://www.sinagtala.net/emailview.phps and this is the code for my delete confirmation page http://www.sinagtala.net/emaildelete.phps
  2. i already replaced <?= $uRow[0] ?> with this <? echo $uRow[0]; ?> but it still didnt work. what else is wrong on my codes?
  3. thats not the original link of my emaildelete.php i just renamed it so u can see the code. the emaildelete.php and my formpage is located in a different folder
  4. yes and and this is the code for my confirmation page http://www.sinagtala.net/emaildelete.phps whats wrong on my codes?
  5. guys, i need help, i have a form with a checkbox that has a delete button. my problem is the confirmation page is not working right. the error message is page cannot be found this is the code for the form [code]<table border="0" cellpadding="0" cellspacing="0" bordercolor="0">                 <tr>                   <td width="364"><img src="../images/spacer.gif" width="13" height="10" /></td>                 </tr>                                 <tr>                   <td bgcolor="#A2330F"><img src="../images/spacer.gif" width="13" height="2" /></td>                 </tr>                 <tr>                   <td><img src="../images/spacer.gif" width="13" height="15" /></td>                 </tr>                 <tr>                   <td align="right" valign="top"><form action="emailtdelete.php" method="post" name="frmemail" id="frmemail">   <? include '../db_connect2.php'; //query Start $uSql = "SELECT UserID, full_name, company, email FROM emailadd ORDER by UserID DESC"; $uResult = mysql_query($uSql, $connection); if(!$uResult){ echo 'no data found'; } else{ while($uRow = mysql_fetch_row($uResult)){ //query end ?>                       <table width="635" border="0" cellspacing="0" cellpadding="0">                       <tr>                         <td colspan="14" align="right" class="bodytext"><span class="bodytext3"><img src="../images/spacer.gif" width="10" height="10" />&nbsp;&nbsp;</span></td>                       </tr>                       <tr>                         <td width="10"><img src="../images/spacer.gif" width="10" height="10" /></td>                         <td width="51" class="bodytext3">email id: </td>                         <td width="10"><img src="../images/spacer.gif" width="10" height="10" /></td>                         <td width="51" class="bodytext"> <?= $uRow[0]?></td>                         <td width="10" class="bodytext"><img src="../images/spacer.gif" width="10" height="10" /></td>                         <td bgcolor="#E14B19" class="bodytext"><img src="../images/spacer.gif" width="2" height="10" /></td>                         <td width="202" class="bodytext">&nbsp;<?= $uRow[1]?></td>                         <td width="1" bgcolor="#E14B19" class="bodytext"><img src="../images/spacer.gif" width="1" height="11" /></td>                         <td width="185" class="bodytext">&nbsp;<?= $uRow[2]?></td>                         <td bgcolor="#A2330F" class="bodytext">&nbsp;</td>                         <td colspan="4" class="bodytext">&nbsp;</td>                         </tr>                       <tr>                         <td colspan="5" align="right" class="bodytext">&nbsp;</td>                         <td width="1" align="right" bgcolor="#E14B19" class="bodytext"><img src="../images/spacer.gif" width="1" height="10" /></td>                         <td colspan="3" class="bodytext">&nbsp;<?= $uRow[3]?></td>                         <td width="1" align="right" bgcolor="#A2330F" class="bodytext"><img src="../images/spacer.gif" width="1" height="10" /></td>                         <td width="20" align="right" class="bodytext"><input type="checkbox" name="eid"value="<?= $uRow[0]?>"></td>                         <td width="10" align="right" class="bodytext"><img src="../images/spacer.gif" width="10" height="10" /></td>                         <td width="52" align="right" class="bodytext"><input name="delete2" type="submit" value="Delete" onclick="return confirmSubmit()" /></td>                         <td width="29" align="right" class="bodytext"><img src="../images/spacer.gif" width="20" height="10" /></td>                       </tr>                       <tr>                         <td colspan="14" align="right" class="bodytext"><img src="../images/spacer.gif" width="10" height="10" /></td>                       </tr>                       <tr>                         <td colspan="14" align="right" bgcolor="#E14B19" class="bodytext"><img src="../images/spacer.gif" width="1" height="1" /></td>                       </tr>                     </table>       <?   } } ?>                   </form></td>                 </tr>                 <tr>                   <td>&nbsp;</td>                 </tr>               </table>[/code]
  6. guys, i need help.... how can i set my form in such a way that the sender must either fill up either 1 of the 2 fields? example name: company: email address: on my condition, email address is required but for name and company, he can either fill up just one of them. otherwise an error will appear. from this code what should i do here to fix my problem? thanks! [code]echo "<CENTER>"; if (($name == "") || ($company == "") || ($email == "")) { echo '<br><br><span class="bodytext3">Please complete the form. Thanks!</span><br>'; exit; } if(!email_is_valid($email)) { echo '<br><br><span class="bodytext3"><br>Email Address Invalid. <br>Please use a valid Email Address</span><br>'; echo '<span class="bodytext3"><br>Thank You!</span><br>';                    exit; } [/code]
  7. ohhhhh!!! i got it. hehehehe.. sorry dudes!!! and thanks a lot!!! i owe you justin and thorpe this one i hope i could be as good as you someday. hehehe
  8. i tried this one but its still popping out the error message "You could not be logged in! Either the username and password do not match! Please try again!" [code]<? session_start(); $username = $_POST['username']; $password = $_POST['password']; if(empty($username) || empty($password)){ echo '<script language=javascript> alert("Please enter ALL of the information!");</script>'; echo '<script language=javascript> top.location = "index.php";</script>'; exit(); } include '../db_connect.php'; $result = mysql_query("SELECT userid, user_level FROM users WHERE username = '{$username}' AND password = '{$password}'"); $numb_rows = mysql_num_rows($result); if($numb_rows == 0) {   //NOT A VALID LOGIN/PASSWORD   echo '<script language=javascript> alert("You could not be logged in! Either the username and password do not match! Please try again!");</script>';   echo '<script language=javascript> top.location = "index.php";</script>';   die(); } $row = mysql_fetch_assoc($result); $password = md5($_POST['password']); $_SESSION['userid'] = $row['userid']; $_SESSION['username'] = $username; $_SESSION['user_level'] = $row['user_level']; mysql_query("UPDATE users SET last_login=now() WHERE userid=" . $row['userid'] . ""); if($row['user_level'] == 0) {     header("Location: homepage.php"); } else if($row['user_level'] == 1) {     header("Location: homepage2.php"); } ?>[/code]
  9. this is what i did base from your codes [code]<? session_start(); $username = $_POST['username']; $password = $_POST['password']; if(empty($username) || empty($password)){ echo '<script language=javascript> alert("Please enter ALL of the information!");</script>'; echo '<script language=javascript> top.location = "index.php";</script>'; exit(); } include '../db_connect.php'; $result = mysql_query("SELECT userid, user_level FROM users WHERE username = '{$username}' AND password = '{$password}'"); $numb_rows = mysql_num_rows($result); if($numb_rows == 0) {   //NOT A VALID LOGIN/PASSWORD   echo '<script language=javascript> alert("You could not be logged in! Either the username and password do not match! Please try again!");</script>';   echo '<script language=javascript> top.location = "index.php";</script>';   die(); } $row = mysql_fetch_assoc($result); $_SESSION['userid'] = $row['userid']; $_SESSION['username'] = $username; $_SESSION['user_level'] = $row['user_level']; mysql_query("UPDATE users SET last_login=now() WHERE userid=" . $row['userid'] . ""); if($row['user_level'] == 0) {     header("Location: homepage.php"); } else if($row['user_level'] == 1) {     header("Location: homepage2.php"); } ?>[/code] i tried logging in but it always keeps on popping up the error message "You could not be logged in! Either the username and password do not match! Please try again!"
  10. hi, i have an index page wherein you input the username and password there. the form method="post" and the action""checkUser.php" checkUser.php is the one that will verify the userid and points it to either homepage.php or homepage2.php hope this one helps
  11. [code]<? session_start(); $username = $_POST['username']; $password = $_POST['password']; if((!$username) || (!$password)){ echo '<script language=javascript> alert("Please enter ALL of the information!");</script>'; echo '<script language=javascript> top.location = "index.php";</script>'; exit(); } include '../db_connect.php'; $password = md5($password); if($login_check == 0) { //NOT LOGGED IN } $_SESSION['userid'] = $userid; $_SESSION['username'] = $username; $_SESSION['user_level'] = $user_level; mysql_query("UPDATE users SET last_login=now() WHERE userid='$userid'"); header("Location: homepage.php"); } elseif($login_check == 1) { //NOT LOGGED IN } $_SESSION['userid'] = $userid; $_SESSION['username'] = $username; $_SESSION['user_level'] = $user_level; mysql_query("UPDATE users SET last_login=now() WHERE userid='$userid'"); header("Location: homepage2.php"); } else { echo '<script language=javascript> alert("You could not be logged in! Either the username and password do not match! Please try again!");</script>'; echo '<script language=javascript> top.location = "index.php";</script>'; } ?>[/code]
  12. this was in my code before $sql = mysql_query("SELECT * FROM users WHERE username='$username' AND password='$password'"); $login_check = mysql_num_rows($sql); this line is before if($login_check == 0) { //NOT LOGGED IN } what else needs to be fixed here?
  13. http://www.sinagtala.net/checkUser.phps i was able to fix it somehow but when i login using admin or staff userid... its directing me to homepage.php if i login using admin userid it should direct me to homepage.php if i login using staff userid it should direct me to homepage2.php what else is wrong in my codes?
  14. hi, it still wont work im getting this error Parse error: syntax error, unexpected T_ELSEIF in /home/sinag/public_html/admean/checkUser.php on line 30
  15. this is what i did.... is this correct? http://www.sinagtala.net/checkUser.phps
  16. hi guys, so what are the lines should i remove and replaced? i got lost on that conversation. hehehehe. i apologize for that
  17. i already did that and its still getting this error Parse error: syntax error, unexpected T_ELSEIF in /home/sinag/public_html/admean/checkUser.php on line 36
  18. my codes can be checked here http://sinagtala.net/checkUser.phps please check thanks!
  19. its the same, whether i use the code tags or not. is there anything we can do to fix this one? also is there an alternate site were i can post my codes for you to check the problem on my codes? thanks!
  20. hi is there an alternative site were i can place my script? i am getting a page cannot be found error whenever i put my script here
  21. guys, i need help, i have and admin page wherein it has 2 different kinds of user, namely admin and staff. they login to the index page of the admin site and after validation for the admin it will lead him to homepage.php for the staff if will lead him to homepage2.php my problem is with the validation page. i am getting error on line 36 below is my script. hope you can help me with this. thanks in advance!
  22. guys, i need help on my email form. my problem is my emailsubmit page is telling "your message has been sent" but when i check my mail. the test mail that i submit several times didnt got in. this is the code for the form page ---- [code]<style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } --> </style><table width="407" border="0" cellspacing="0" cellpadding="0">                         <tr>                           <td><img src="images/spacer.gif" width="10" height="10"></td>                         </tr>                         <tr>                           <td><form method='post' action='contactemail.php'>                               <table width="384" height="406" border=0 cellpadding=0 cellspacing=0>                                 <tbody>                                   <tr>                                     <td height=4 colspan="4"></td>                                   </tr>                                   <tr>                                     <td height=4 colspan="4" class="bodytext3">&nbsp;&nbsp;&nbsp;                                     GENERAL INQUIRY</td>                                   </tr>                                   <tr>                                     <td height=8 colspan="4"><img src="images/spacer.gif" width="1" height="8"></td>                                   </tr>                                   <tr>                                     <td width=10 height="18" class="bodytext3"><img src="images/spacer.gif" width="10" height="10"></td>                                     <td width=66 height="18" class="bodytext3">Name</td>                                     <td width=4>&nbsp;</td>                                     <td width="304"><input name=name class="newsletter" size=30 maxlength=50>                                    </td>                                   </tr>                                   <tr>                                     <td height="8" colspan="4"><img src="images/spacer.gif" width="1" height="8"></td>                                   </tr>                                   <tr>                                     <td width=10 height="18" class="bodytext3">&nbsp;</td>                                     <td width=66 height="18" class="bodytext3">Contact No.</td>                                     <td width=4>&nbsp;</td>                                     <td><input name=phone class="newsletter" size=30 maxlength=80>                                    </td>                                   </tr>                                   <tr>                                     <td height="8" colspan="4"><img src="images/spacer.gif" width="1" height="8"></td>                                   </tr>                                   <tr>                                     <td width=10 height="18" class="bodytext3">&nbsp;</td>                                     <td width=66 height="18" class="bodytext3">Email</td>                                     <td width=4>&nbsp;</td>                                     <td><input name=email class="newsletter" size=30 maxlength=80>                                    </td>                                   </tr>                                   <tr>                                     <td height="8" colspan="4"><img src="images/spacer.gif" width="1" height="8"></td>                                   </tr>                                   <tr>                                     <td width=10 align=left valign=top class="bodytext3">&nbsp;</td>                                     <td width=66 align=left valign=top class="bodytext3">Company/<br>                                     Organization</td>                                     <td width=4>&nbsp;</td>                                     <td height="18" align=left valign=top><p>                                         <input name=company class="newsletter" size=30 maxlength=80>                                         <input name="websitecheckbox" type=checkbox class="newsletter3" value=nowebsite>                                         <span class="bodytext2">None </span><span class="bodylink3"><br>                                         <br>                                     </span></p></td>                                   </tr>                                   <tr>                                     <td  background="images/bg3.gif" height="1" colspan="4" align=left valign=top class="bodylink3"><img src="images/spacer.gif"></td>                                   </tr>                                   <tr>                                     <td height="8" colspan="2" align=left valign=top class="bodylink3">&nbsp;</td>                                     <td width=4>&nbsp;</td>                                     <td valign="top" align="left"><span class="bodytext2"> I prefer to be contactd by</span>                                         <input name="phonecheckbox" type="checkbox" class="newsletter3" value="phone" />                                         <span class="bodytext2">Phone</span>                                         <input name="emailcheckbox" type="checkbox" class="newsletter3" value="email" />                                         <span class="bodytext2">Email</span></td>                                   </tr>                                   <tr>                                     <td height="7" colspan="4" align=left valign=top class="bodylink3"><img src="images/spacer.gif" width="10" height="6" /></td>                                   </tr>                         <tr>                         <td background="images/bg3.gif" colspan="4" align=left valign=top class="bodylink3" height="1"><img src="images/spacer.gif" width="1" height="1"></td></tr>                         <tr>                         <td height="100" colspan="2" align=left valign=top class="bodylink3">&nbsp;</td>                      <td width=4>&nbsp;</td>                         <td valign=top align=left><span class="bodytext3">Message Inquiry</span><br> <textarea name=description cols=50 rows=6 wrap=VIRTUAL class="newsletter2"></textarea><br><br>                         <span class="bodytext2">How did you hear about Sinag Tala?</span><br>                         <input name=referred class="newsletter" size=50 maxlength=100>                        </td></tr>                         <tr>                         <td  background="images/bg3.gif" colspan="4" height="1"><img src="images/spacer.gif" width="1" height="1"></td>                                   </tr>                                   <tr>                                     <td height="4" colspan="4" align=left valign=top class="bodylink3"><img src="images/spacer.gif" width="1" height="4"></td>                                   </tr>                                   <tr>                                     <td height="24" colspan="2" align=left valign=top class="bodylink3">&nbsp;</td>                                     <td width=4>&nbsp;</td>                                     <td valign=top align=left><input type=submit value=submit name=submit>                                         <input type=hidden value=http://www. name=redirect>                                         <input type=hidden value=Sinagtala_General_Inquiry name=subject>                                         <input type=hidden value=admin@sinagtala.net name=recipient>                                    </td>                                   </tr>                                 </tbody>                             </table>                           </form></td>                         </tr>                     </table> [/code]
  23. it worked bro! thanks a lot! this site and forum is a huge help to all of us.
  24. that workeb bro! thanks a lot! this site and forum is really helpful to everyone! ;)
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.