Jump to content

searls03

Members
  • Posts

    907
  • Joined

  • Last visited

Everything posted by searls03

  1. other piece that I want to do is also make sure that the new and confirm passwords match. how do I do that? <?php // Process the form if it is submitted $password1 = $_POST['password']; $password2 = $_POST['new']; $password3 = $_POST['password']; $password123 = md5($password1); if (isset($_POST['passbut'])) { if ($password123 == $password) { $password12 = $_POST['password']; $sql = mysql_query("UPDATE sessions SET password='$password12' WHERE id='$userid1'")or die(mysql_error()); $message ='Your Account info has been saved'; echo "<font color = 'red'>"; echo $message; echo "</font>"; }else{ echo '<font color="red">'; echo "passwords do not match"; echo '</font>'; } } // close if post ?> <hr /> <font size="2px" color="#666666">Your Password</font><br /> <br /> <br /> <br /> <br /> </div> <div class="CollapsiblePanelContent"><form action="settings.php" method="post"><table width="371" border="0" cellspacing="2" cellpadding="0"> <tr> <td width="109" height="29" scope="col">Old Password:</td> <td width="242" scope="col"><label for="password"></label> <div align="left"> <input name="password" type="text" id="password" /> </div></td> </tr> <tr> <td>New Password:</td> <td><label for="new"></label> <div align="left"> <input type="text" name="new" id="new" /> </div> <label for="security"></label></td> </tr> <tr> <td>Confirm Password:</td> <td><label for="confirm"></label> <div align="left"> <input type="text" name="confirm" id="confirm" /> </div> <label for="answer"></label></td> </tr></table><input name="passbut" type="submit" class="fullname" value="Save Password" id="passbut"/> <br /> <br /> </form>
  2. ok, so I have this so far and I want it to echo password does not match if password123 does not equal password. and if it does match the sql query will run. do i put the else statement after the sql or before it. could you tell me where to start it........like put a comment that shows where? <?php // Process the form if it is submitted $password1 = $_POST['password']; $password123 = md5($password1); if ($_POST['passbut']) { if ($password123 == $password) { $password12 = $_POST['password']; $sql = mysql_query("UPDATE sessions SET password='$password12' WHERE id='$userid1'")or die(mysql_error()); $message ='Your Account info has been saved'; echo "<font color = 'red'>"; echo $message; echo "</font>"; }} // close if post ?>
  3. its working nw......apparently i needed to refresh the page after submitting the form.
  4. well i had it as psot and i changed that and it still doesn't post.
  5. it also going to this address when i try to post /settings1.php?first=A+&middle3=M&last=S&fullname=Save+Changes
  6. I had that at first, didn't work, then i took it out and forgot to add it again
  7. this is entire code for page so you can see that I connect to database and such: <?php session_start(); // Must start session first thing /* Created By Adam Khoury @ www.flashbuilding.com -----------------------June 20, 2008----------------------- */ // Here we run a login check if (!isset($_SESSION['username'])) { echo 'Please <a href="/login.php">log in</a> to access your account'; exit(); } //Connect to the database through our include include_once "connect_to_mysql_1.php"; // Place Session variable 'id' into local variable $username1 = $_SESSION['username']; ?> <?php // Query member data from the database and ready it for display $sql = mysql_query("SELECT first, middle, last, username, email, question, answer, password FROM sessions WHERE username='$username1'"); while($row = mysql_fetch_array($sql)){ $userid = $row["userid"]; $first = $row["first"]; $middle = $row["middle"]; $last = $row["last"]; $username = $row["username"]; $email = $row["email"]; $question = $row["question"]; $answer = $row["answer"]; $password = $row["password"]; $userid1 = $row["id"]; } ?> <?php // Process the form if it is submitted if ($_POST['first']) { $first1 = $_POST['first']; $middle1 = $_POST['middle3']; $last1 = $_POST['last']; $name1 = "{$_POST['first']}{$_POST['last']}"; $sql = mysql_query("UPDATE sessions SET first='$first1', middle='$middle1', last='$last1', name='$name1' WHERE id='$userid'")or die(mysql_error()); $message ='Your Account info has been saved'; echo "<font color = 'red'>"; echo $message; echo "</font>"; } // close if post ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script type="text/javascript" src="jquery-1.2.6.min.js"></script> <script type="text/javascript" src="jquery.livequery.js"></script> <link href="dependencies/screen.css" type="text/css" rel="stylesheet" /> <script src="jquery.elastic.js" type="text/javascript" charset="utf-8"></script> <link href="css/screen.css" type="text/css" rel="stylesheet" /> <script src="jquery.watermarkinput.js" type="text/javascript"></script> <script src="Spry-UI-1.7/includes/SpryDOMUtils.js" type="text/javascript"></script> <script src="Spry-UI-1.7/includes/SpryDOMEffects.js" type="text/javascript"></script> <script src="Spry-UI-1.7/includes/SpryWidget.js" type="text/javascript"></script> <script src="Spry-UI-1.7/includes/SpryMenu.js" type="text/javascript"></script> <script src="Spry-UI-1.7/includes/plugins/MenuBar2/SpryMenuBarKeyNavigationPlugin.js" type="text/javascript"></script> <script src="Spry-UI-1.7/includes/plugins/MenuBar2/SpryMenuBarIEWorkaroundsPlugin.js" type="text/javascript"></script> <script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script> <script src="jquery-ui-1.7.2/js/jquery-1.3.2.min.js" type="text/javascript"></script> <script src="jquery-ui-1.7.2/js/jquery-ui-1.7.2.min.js" type="text/javascript"></script> <script src="SpryAssets/SpryCollapsiblePanel.js" type="text/javascript"></script> <link type="text/css" rel="stylesheet" media="all" href="css/chat.css" /> <link type="text/css" rel="stylesheet" media="all" href="css/screen.css" /><link href="jquery-ui-1.7.2/css/base/ui.core.css" rel="stylesheet" type="text/css"> <link href="jquery-ui-1.7.2/css/base/ui.accordion.css" rel="stylesheet" type="text/css"> <link href="jquery-ui-1.7.2/css/base/ui.theme.css" rel="stylesheet" type="text/css"> <link href="jquery-ui-1.7.2/css/base/ui.images.css" rel="stylesheet" type="text/css"> <script type="text/javascript"> function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } </script> <style type="text/css"> #apDiv1 { position:absolute; left:0px; top:0px; width:100%; height:50px; z-index:1; background-color: #000; padding: 0px; text-align: left; } </style> <link href="Spry-UI-1.7/css/Menu/basic/SpryMenuBasic.css" rel="stylesheet" type="text/css"> <style type="text/css"> /* BeginOAWidget_Instance_2141544: #MenuBar */ /* Settable values for skinning a Basic menu via presets. If presets are not sufficient, most skinning should be done in these rules, with the exception of the images used for down or right pointing arrows, which are in the file SpryMenuBasic.css These assume the following widget classes for menu layout (set in a preset) .MenuBar - Applies to all menubars - default is horizontal bar, all submenus are vertical - 2nd level subs and beyond are pull-right. .MenuBarVertical - vertical main bar; all submenus are pull-right. You can also pass in extra classnames to set your desired top level menu bar layout. Normally, these are set by using a preset. They only apply to horizontal menu bars: MenuBarLeftShrink - The menu bar will be horizontally 'shrinkwrapped' to be just large enough to hold its items, and left aligned MenuBarRightShrink - Just like MenuBarLeftShrink, but right aligned MenuBarFixedLeft - Fixed at a specified width set in the rule '.MenuBarFixedLeft', and left aligned. MenuBarFixedCentered - - Fixed at a specified width set in the rule '.MenuBarFixedCentered', and centered in its parent container. MenuBarFullwidth - Grows to fill its parent container width. In general, all rules specified in this file are prefixed by #MenuBar so they only apply to instances of the widget inserted along with the rules. This permits use of multiple MenuBarBasic widgets on the same page with different layouts. Because of IE6 limitations, there are a few rules where this was not possible. Those rules are so noted in comments. */ #MenuBar { background-color:#000000; font-family: Arial, Helvetica, sans-serif; /* Specify fonts on on MenuBar and subMenu MenuItemContainer, so MenuItemContainer, MenuItem, and MenuItemLabel at a given level all use same definition for ems. Note that this means the size is also inherited to child submenus, so use caution in using relative sizes other than 100% on submenu fonts. */ font-weight: normal; font-size: 16px; font-style: normal; padding:0; border-color: #000000 #000000 #000000 #000000; border-width:0px; border-style: none none none none; } /* Caution: because ID+class selectors do not work properly in IE6, but we want to restrict these rules to just this widget instance, we have used string-concatenated classnames for our selectors for the layout type of the menubar in this section. These have very low specificity, so be careful not to accidentally override them. */ .MenuBar br { /* using just a class so it has same specificity as the ".MenuBarFixedCentered br" rule bleow */ display:none; } .MenuBarLeftShrink { float: left; /* shrink to content, as well as float the MenuBar */ width: auto; } .MenuBarRightShrink { float: right; /* shrink to content, as well as float the MenuBar */ width: auto; } .MenuBarFixedLeft { float: left; width: 80em; } .MenuBarFixedCentered { float: none; width: 80em; margin-left:auto; margin-right:auto; } .MenuBarFixedCentered br { clear:both; display:block; } .MenuBarFixedCentered .SubMenu br { display:none; } .MenuBarFullwidth { float: left; width: 100%; } /* Top level menubar items - these actually apply to all items, and get overridden for 1st or successive level submenus */ #MenuBar .MenuItemContainer { padding: 0px 0px 0px 0px; margin: 0; /* Zero out margin on the item containers. The MenuItem is the active hover area. For most items, we have to do top or bottom padding or borders only on the MenuItem or a child so we keep the entire submenu tiled with items. Setting this to 0 avoids "dead spots" for hovering. */ } #MenuBar .MenuItem { padding: 0px 24px 0px 0px; background-color:#000000; border-width:0px; border-color: #cccccc #ffffff #cccccc #ffffff; border-style: none solid none solid; } #MenuBar .MenuItemFirst { border-style: none none none none; } #MenuBar .MenuItemLast { border-style: none solid none none; } #MenuBar .MenuItem .MenuItemLabel{ text-align:center; line-height:1.4em; color:#ffffff; background-color:#000000; padding: 6px 15px 6px 39px; width: 10em; width:auto; } .SpryIsIE6 #MenuBar .MenuItem .MenuItemLabel{ width:1em; /* Equivalent to min-width in modern browsers */ } /* First level submenu items */ #MenuBar .SubMenu .MenuItem { font-family: Arial, Helvetica, sans-serif; font-weight: normal; font-size: 14px; font-style: normal; background-color:#ffffff; padding:0px 2px 0px 0px; border-width:0px; border-color: #cccccc #cccccc #cccccc #cccccc; /* Border styles are overriden by first and last items */ border-style: solid solid none solid; } #MenuBar .SubMenu .MenuItemFirst { border-style: solid solid none solid; } #MenuBar .SubMenu .MenuItemFirst .MenuItemLabel{ padding-top: 6px; } #MenuBar .SubMenu .MenuItemLast { border-style: solid solid solid solid; } #MenuBar .SubMenu .MenuItemLast .MenuItemLabel{ padding-bottom: 6px; } #MenuBar .SubMenu .MenuItem .MenuItemLabel{ text-align:left; line-height:1em; background-color:#ffffff; color:#333333; padding: 6px 12px 6px 5px; width: 7em; } /* Hover states for containers, items and labels */ #MenuBar .MenuItemHover { background-color: #666666; border-color: #cccccc #cccccc #cccccc #cccccc; } #MenuBar .MenuItemWithSubMenu.MenuItemHover .MenuItemLabel{ background-color: #666666; /* consider exposing this prop separately*/ color: #ffffff; } #MenuBar .MenuItemHover .MenuItemLabel{ background-color: #666666; color: #ffffff; } #MenuBar .SubMenu .MenuItemHover { background-color: #666666; border-color: #666666 #cccccc #cccccc #cccccc; } #MenuBar .SubMenu .MenuItemHover .MenuItemLabel{ background-color: #666666; color: #ffffff; } /* Submenu properties -- First level of submenus */ #MenuBar .SubMenuVisible { background-color: #ffffff; min-width:0%; /* This keeps the menu from being skinnier than the parent MenuItemContainer - nice to have but not available on ie6 */ border-color: #ffffff #ffffff #ffffff #ffffff; border-width:0px; border-style: none none none none; } #MenuBar.MenuBar .SubMenuVisible {/* For Horizontal menubar only */ top: 100%; /* 100% is at the bottom of parent menuItemContainer */ left:0px; /* 'left' may need tuning depending upon borders or padding applied to menubar MenuItemContainer or MenuItem, and your personal taste. 0px will left align the dropdown with the content area of the MenuItemContainer. Assuming you keep the margins 0 on MenuItemContainer and MenuItem on the parent menubar, making this equal the sum of the MenuItemContainer & MenuItem padding-left will align the dropdown with the left of the menu item label.*/ z-index:10; } #MenuBar.MenuBarVertical .SubMenuVisible { top: 0px; left:100%; min-width:0px; /* Do not neeed to match width to parent MenuItemContainer - items will prevent total collapse */ } /* Submenu properties -- Second level submenu and beyond - these are visible descendents of .MenuLevel1 */ #MenuBar .MenuLevel1 .SubMenuVisible { background-color: #ffffff; min-width:0px; /* Do not neeed to match width to parent MenuItemContainer - items will prevent total collapse*/ top: 0px; /* If desired, you can move this down a smidge to separate top item''s submenu from menubar - that is really only needed for submenu on first item of MenuLevel1, or you can make it negative to make submenu more vertically 'centered' on its invoking item */ left:100%; /* If you want to shift the submenu left to partially cover its invoking item, you can add a margin-left with a negative value to this rule. Alternatively, if you use fixed-width items, you can change this left value to use px or ems to get the offset you want. */ } /* IE6 rules - you can delete these if you do not want to support IE6 */ /* A note about multiple classes in IE6. * Some of the rules above use multiple class names on an element for selection, such as "hover" (MenuItemHover) and "has a subMenu" (MenuItemWithSubMenu), * giving the selector '.MenuItemWithSubMenu.MenuItemHover'. * Unfortunately IE6 does not support using mutiple classnames in a selector for an element. For a selector such as '.foo.bar.baz', IE6 ignores * all but the final classname (here, '.baz'), and sets the specificity accordingly, counting just one of those classs as significant. To get around this * problem, we use the plugin in SpryMenuBarIEWorkaroundsPlugin.js to generate compound classnames for IE6, such as 'MenuItemWithSubMenuHover'. * Since there are a lot of these needed, the plugin does not generate the extra classes for modern browsers, and we use the CSS2 style mutltiple class * syntax for that. Since IE6 both applies rules where * it should not, and gets the specificity wrong too, we have to order rules carefully, so the rule misapplied in IE6 can be overridden. * So, we put the multiple class rule first. IE6 will mistakenly apply this rule. We follow this with the single-class rule that it would * mistakenly override, making sure the misinterpreted IE6 specificity is the same as the single-class selector, so the latter wins. * We then create a copy of the multiple class rule, adding a '.SpryIsIE6' class as context, and making sure the specificity for * the selector is high enough to beat the single-class rule in the "both classes match" case. We place the IE6 rule at the end of the * css style block to make it easy to delete if you want to drop IE6 support. * If you decide you do not need IE6 support, you can get rid of these, as well as the inclusion of the SpryMenuBarIEWorkaroundsPlugin.js script. * The 'SpryIsIE6' class is placed on the HTML element by the script in SpryMenuBarIEWorkaroundsPlugin.js if the browser is Internet Explorer 6. This avoids the necessity of IE conditional comments for these rules. */ .SpryIsIE6 #MenuBar .MenuBarView .MenuItemWithSubMenuHover .MenuItemLabel /* IE6 selector */{ background-color: #666666; /* consider exposing this prop separately*/ color: #ffffff; } .SpryIsIE6 #MenuBar .MenuBarView .SubMenu .MenuItemWithSubMenuHover .MenuItemLabel/* IE6 selector */{ background-color: #666666; /* consider exposing this prop separately*/ color: #ffffff; } .SpryIsIE6 #MenuBar .SubMenu .SubMenu /* IE6 selector */{ margin-left: -0px; /* Compensates for at least part of an IE6 "double padding" version of the "double margin" bug */ } #online { position:absolute; left:12px; top:114px; width:102px; height:124px; z-index:10; } /* EndOAWidget_Instance_2141544 */ #online { text-align: left; } #menu { position:absolute; top:15px; width:411px; height:34px; z-index:41; right: 0px; } #apDiv2 { position:absolute; left:4px; top:149px; width:551px; height:201px; z-index:2; } #apDiv2 #Accordion1 .AccordionPanel.AccordionPanelClosed .AccordionPanelTab strong { font-size: 14px; } </style> <link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css"> <style type="text/css"> #apDiv3 { position:absolute; left:117px; top:197px; width:403px; height:96px; z-index:3; } #apDiv2 #TabbedPanels1 .TabbedPanelsContentGroup .TabbedPanelsContent.TabbedPanelsContentVisible #Accordion1 .AccordionPanel.AccordionPanelOpen .AccordionPanelContent #apDiv3 form p label { text-align: left; } #apDiv4 { position:absolute; left:79px; top:14px; width:145px; height:120px; z-index:3; } #apDiv5 { position:absolute; left:-181px; top:-118px; width:69px; height:17px; z-index:3; } #apDiv6 { position:absolute; left:-105px; top:-119px; width:131px; height:20px; z-index:4; } #apDiv7 { position:absolute; left:-179px; top:-89px; width:92px; height:21px; z-index:3; } #apDiv8 { position:absolute; left:-85px; top:-73px; width:125px; height:33px; z-index:3; } #apDiv9 { position:absolute; left:28px; top:12px; width:68px; height:23px; z-index:0; text-align: right; } #apDiv10 { position:absolute; left:6px; top:43px; width:90px; height:22px; z-index:0; text-align: right; } #apDiv11 { position:absolute; left:31px; top:82px; width:66px; height:26px; z-index:0; text-align: right; } #apDiv12 { position:absolute; left:102px; top:10px; width:80px; height:27px; z-index:0; } #apDiv13 { position:absolute; left:103px; top:48px; width:115px; height:37px; z-index:0; } #apDiv14 { position:absolute; left:103px; top:81px; width:124px; height:35px; z-index:0; } #hi { background-color:#F7F7F7; z-index:4; } .kljjkl { color: #999; } </style> <style type="text/css"> #apDiv15 { position:absolute; left:0px; top:47px; width:552px; height:155px; z-index:3; background-color:#F7F7F7; } #apDiv16 { position:absolute; left:93px; top:149px; width:579px; z-index:2; height: 100%; } #apDiv17 { position:absolute; left:156px; top:178px; width:137px; height:16px; z-index:3; } #help { position:absolute; left:50px; top:37px; width:137px; height:16px; z-index:3; text-align: right; }#help1 { position:absolute; left:388px; top:30px; width:137px; height:16px; z-index:3; text-align: right; } #middle { position:absolute; left:50px; top:67px; width:137px; height:16px; z-index:3; text-align: right; } #apDiv18 { position:absolute; left:411px; top:85px; width:192px; height:29px; z-index:3; } #apDiv19 { position:absolute; left:50px; top:100px; width:137px; height:30px; z-index:3; text-align: right; } #apDiv20 { position:absolute; left:355px; top:110px; width:182px; height:27px; z-index:3; } #bod { position:absolute; left:0px; top:0px; width:100%; z-index:3; bottom: 0px; height: auto; right: 0px; } #apDiv16 #TabbedPanels1 .TabbedPanelsContentGroup .TabbedPanelsContent.TabbedPanelsContentVisible table tr td { text-align: right; } </style> <link href="SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" /> <style type="text/css"> #apDiv21 { position:relative; left:-20%; width:200%; height:75px; z-index:3; bottom: 0%; right: 0px; } #apDiv22 { position:absolute; left:0px; width:100%; height:66px; z-index:4; bottom: 0px; } .fullname { position:relative; left:0px; width:100px; height:30px; z-index:4; top:25px; background-color:black; color:white; text-align: center; } .fullname1 { position:relative; width:100px; height:30px; z-index:4; top:30px; background-color:black; color:white; left:-30px; } #apDiv16 #TabbedPanels1 .TabbedPanelsContentGroup .TabbedPanelsContent.TabbedPanelsContentVisible #CollapsiblePanel2 #CollapsiblePanel3 { } </style> </head> <body onload="MM_preloadImages('hover.png')"> <div id="apDiv1"> <div id="menu"> <ul id="MenuBar" class="MenuBarHorizontal"> <li><a href="index.php">Home</a> </li> <li><a href="profile.php">Profile</a></li> <li><a class="MenuBarItemSubmenu" href="#">Account</a> <ul> <li><a href="settings.php">Account Settings</a> </li> <li><a href="privacy.php">Privacy Settings</a></li> <li><a href="logout.php">Logout</a></li> </ul> </li> </ul> <script type="text/javascript"> // BeginOAWidget_Instance_2141544: #MenuBar var MenuBar = new Spry.Widget.MenuBar2("#MenuBar", { widgetID: "MenuBar", widgetClass: "MenuBar MenuBarRightShrink", insertMenuBarBreak: true, mainMenuShowDelay: 100, mainMenuHideDelay: 200, subMenuShowDelay: 200, subMenuHideDelay: 200 }); // EndOAWidget_Instance_2141544 </script></div> <a href="main.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image1','','hover.png',1)"><img src="main.png" name="Image1" width="600" height="50" border="0" id="Image1" /></a> </div> <!-- Accordion --> <?php // Process the form if it is submitted if ($_POST['usernamebut']) { $username = $_POST['username']; $sql = mysql_query("UPDATE sessions SET username='$username' WHERE id='$userid'")or die(mysql_error()); $message ='Your Account info has been saved'; echo "<font color = 'red'>"; echo $message; echo "</font>"; } // close if post ?> <?php // Process the form if it is submitted if ($_POST['emailbut']) { $email = $_POST['email']; $sql = mysql_query("UPDATE sessions SET email='$email' WHERE id='$userid'")or die(mysql_error()); $message ='Your Account info has been saved'; echo "<font color = 'red'>"; echo $message; echo "</font>"; } // close if post ?> <?php // Process the form if it is submitted $password1 = $_POST['password']; $password123 = md5($password1); if ($_POST['passbut']) { if ($password123 == $password) { $password12 = $_POST['password']; $sql = mysql_query("UPDATE sessions SET password='$password12' WHERE id='$userid'")or die(mysql_error()); $message ='Your Account info has been saved'; echo "<font color = 'red'>"; echo $message; echo "</font>"; }} // close if post ?> <div id="apDiv16"> <div id="TabbedPanels1" class="TabbedPanels"> <ul class="TabbedPanelsTabGroup"> <li class="TabbedPanelsTab" tabindex="0">Settings</li> <li class="TabbedPanelsTab" tabindex="0">Notifications</li> </ul> <div class="TabbedPanelsContentGroup"> <div class="TabbedPanelsContent"> <tr> <td> </td> <td> </td> </tr> <tr> <td></td> <td><label for="email"></label></td> </tr> <tr> <td></td> <td><label for="username"></label></td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> <div id="CollapsiblePanel1" class="CollapsiblePanel"> <div class="CollapsiblePanelTab" tabindex="0"><strong>Name</strong> <hr><font size="2px" color="#666666">Your real name</font> <br /> <br /> <br /> <br /> </div> <div class="CollapsiblePanelContent"> <form id="form2" name="form2" action="settings1.php"> <table width="299" border="0" cellspacing="3" cellpadding="0"> <tr> <td width="117" scope="col">First Name:</td> <td width="194" scope="col"> <input name="first" type="text" id="first" value="<?php echo $first; ?>" /></td> </tr><tr> <td> </td> <td> </td> </tr> <tr> <td>Middle Name:<br /> (optional)</td> <td><input name="middle3" type="text" id="middle3" value="<?php echo $middle; ?>" /></td> </tr><tr> <td> </td> <td> </td> </tr> <tr> <td>Last Name:</td> <td><input name="last" type="text" id="last" value="<?php echo $last; ?>" /></td> </tr><tr><td></td><td><input name="fullname" type="submit" class="fullname" value="Save Changes" id="fullname"/></td></tr> </table></form> <br /> <br /> </div> </div> <div id="CollapsiblePanel2" class="CollapsiblePanel"> <div class="CollapsiblePanelTab" tabindex="0"><strong>Username</strong> <hr /><font size="2px" color="#666666">Your Username</font> <br /> <br /> <br /> <br /> </div> <div class="CollapsiblePanelContent"> <form method="post" action="settings.php"> Username: <input name="username" type="text" id="username" value="<?php echo $username; ?>" /> <input name="usernamebut" type="submit" class="fullname1" value="Save username" id="usernamebut"/></form> <p> </p> <p> </p> </div> <div id="CollapsiblePanel3" class="CollapsiblePanel"> <div class="CollapsiblePanelTab" tabindex="0"><strong>Email</strong> <hr /><font size="2px" color="#666666">Contact Information</font><br /> <br /> <br /> <br /> </div> <div class="CollapsiblePanelContent"><form action="settings.php" method="post"> Email Address: <input name="email" type="text" id="email" value="<?php echo $email; ?>" /><input name="emailbut" type="submit" class="fullname1" value="Save email" id="emailbut"/></form> </div><br /><br /> <div id="CollapsiblePanel4" class="CollapsiblePanel"> <div class="CollapsiblePanelTab" tabindex="0"><strong>Password</strong> <hr /> <font size="2px" color="#666666">Your Password</font><br /> <br /> <br /> <br /> <br /> </div> <div class="CollapsiblePanelContent"><form action="settings.php" method="post"><table width="371" border="0" cellspacing="2" cellpadding="0"> <tr> <td width="109" height="29" scope="col">Old Password:</td> <td width="242" scope="col"><label for="password"></label> <div align="left"> <input name="password" type="text" id="password" /> </div></td> </tr> <tr> <td>New Password:</td> <td><label for="new"></label> <div align="left"> <input type="text" name="new" id="new" /> </div> <label for="security"></label></td> </tr> <tr> <td>Confirm Password:</td> <td><label for="confirm"></label> <div align="left"> <input type="text" name="confirm" id="confirm" /> </div> <label for="answer"></label></td> </tr></table><input name="passbut" type="submit" class="fullname" value="Save Password" id="passbut"/> <br /> <br /> </form> <br /> <br /> </div> <div id="CollapsiblePanel5" class="CollapsiblePanel"> <div class="CollapsiblePanelTab" tabindex="0"><strong>Security Question</strong> <hr /><font size="2px" color="#666666">Used if you forget your password or username</font> <br /> <br /> <br /> <br /> </div> <div class="CollapsiblePanelContent"><form action="settings.php" method="post"><table> <tr> <td>Security Question:</td> <td><select name="security" size="1" id="security"> <option value="What city were you born in?">What city were you born in?</option> <option value="What is your mother's maiden name?">What is your mother's maiden name?</option> <option value="What is the name of your first pet?">What is the name of your first pet?</option> <option value="What school did you go to?">What school did you go to?</option> <option value="<?php echo $question; ?>" selected="selected"><?php echo $question; ?></option> </select></td> </tr> <tr> <td>Answer:</td> <td><div align="left"> <input name="answer" type="text" id="answer" value="<?php echo $answer; ?>" /> </div></td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> </table><input name="securitybut" type="submit" class="fullname" value="Save Question" id="securitybut"/> <br /> <br /> <br /> <br /> </form></div> </div> </div> </div> </div> </div> <div class="TabbedPanelsContent"> </div> </div> <form id="form1" name="form1" method="post" action=""> <br /> <br /> <br /> <br /> <?php echo $first; ?><br /> <br /> <br /> <br /> </form> </div> </div> <br /><br /><br /><br /> <script type="text/javascript"> var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1"); var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1", {contentIsOpen:false, enableAnimation:false}); var CollapsiblePanel2 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel2", {contentIsOpen:false, enableAnimation:false}); var CollapsiblePanel3 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel3", {contentIsOpen:false, enableAnimation:false}); var CollapsiblePanel4 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel4", {contentIsOpen:false, enableAnimation:false}); </script><br /><br /><br /><br /><br /><br /> <script type="text/javascript"> var CollapsiblePanel5 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel5", {contentIsOpen:false, enableAnimation:false}); </script> </body> </html>
  8. can anyone see why this form wont post to the database? I cant seem to do it to save my life!!!!!!! <form id="form2" name="form2" action="settings1.php"> <table width="299" border="0" cellspacing="3" cellpadding="0"> <tr> <td width="117" scope="col">First Name:</td> <td width="194" scope="col"> <input name="first" type="text" id="first" value="<?php echo $first; ?>" /></td> </tr><tr> <td> </td> <td> </td> </tr> <tr> <td>Middle Name:<br /> (optional)</td> <td><input name="middle3" type="text" id="middle3" value="<?php echo $middle; ?>" /></td> </tr><tr> <td> </td> <td> </td> </tr> <tr> <td>Last Name:</td> <td><input name="last" type="text" id="last" value="<?php echo $last; ?>" /></td> </tr><tr><td></td><td><input name="fullname" type="submit" class="fullname" value="Save Changes" id="fullname"/></td></tr> </table></form> <?php // Process the form if it is submitted if ($_POST['first']) { $first1 = $_POST['first']; $middle1 = $_POST['middle3']; $last1 = $_POST['last']; $name1 = "{$_POST['first']}{$_POST['last']}"; $sql = mysql_query("UPDATE sessions SET first='$first1', middle='$middle1', last='$last1', name='$name1' WHERE id='$userid'")or die(mysql_error()); $message ='Your Account info has been saved'; echo "<font color = 'red'>"; echo $message; echo "</font>"; } // close if post ?>
  9. none of those helped the problem . nothing had happened when I did any of those.
  10. I didn't even think about that thanks!!!!!
  11. I would like the whole page to scroll.....not just the one DIV
  12. ok, so I have this facebook like wall on a webpage and I am having trouble with the page extending when posts on the wall are past the bottom of the screen. the posts just go off screen, no scroll bar or anything. here is code, let me know if this isnt the right code <?php session_start(); // Must be already set $username1 = $_SESSION['username']; include_once "connect_to_mysql_1.php"; ?><?php if ($_POST['logout']) { $sql = mysql_query("UPDATE sessions SET loggedin='0' where username='$username1'")or die(mysql_error()); echo "hello '$username1'"; unset($_SESSION['username']); } ?> <?php if(isset($_SESSION['username'])) { $query = "SELECT username, loggedin, name FROM sessions order by loggedin desc"; $result = mysql_query($query) or die('Error : ' . mysql_error()); // create the article list while($row = mysql_fetch_array($result, MYSQL_NUM)) { list($username, $loggedin, $name) = $row; if ($loggedin == 1){ $as .= "<p><image src='ONLINE.png'></a><a href=\"javascript:void(0)\" onClick=\"javascript:chatWith('$username')\">$name</a> </p>\r\n"; }else if ($loggedin == 0){ $as .= "<p><img src='OFFLINE.png'> </a><a href=\"javascript:void(0)\" onClick=\"javascript:chatWith('$username')\">$name</a> </p>\r\n"; }else{echo "you are not logged in"; }}} ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd" > <head> <title>Demos : 99Points.info : Fresh Facebook Style TextArea with Wall Posting Script using jQuery PHP and Ajax</title> <style> body { background-color: #eeeeee; padding:0; margin:0 auto; font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif; font-size:11px; } </style> <link type="text/css" rel="stylesheet" media="all" href="css/chat.css" /> <link type="text/css" rel="stylesheet" media="all" href="css/screen.css" /> <!--[if lte IE 7]> <link type="text/css" rel="stylesheet" media="all" href="css/screen_ie.css" /> <![endif]--> <style type="text/css"> #apDiv1 { position:absolute; left:7px; top:312px; width:102px; height:124px; z-index:300; } #apDiv2 { position:absolute; left:3px; top:56px; width:131px; height:435px; z-index:2; } #apDiv3 { position:absolute; left:267px; top:52px; width:345px; height:1080px; z-index:40; } #apDiv1 { text-align: left; } </style> <link href="facebox.css" media="screen" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="jquery-1.2.6.min.js"></script> <script type="text/javascript" src="jquery.livequery.js"></script> <link href="dependencies/screen.css" type="text/css" rel="stylesheet" /> <script src="jquery.elastic.js" type="text/javascript" charset="utf-8"></script> <script src="jquery.watermarkinput.js" type="text/javascript"></script> <script src="Spry-UI-1.7/includes/SpryDOMUtils.js" type="text/javascript"></script> <script src="Spry-UI-1.7/includes/SpryDOMEffects.js" type="text/javascript"></script> <script src="Spry-UI-1.7/includes/SpryWidget.js" type="text/javascript"></script> <script src="Spry-UI-1.7/includes/SpryMenu.js" type="text/javascript"></script> <script src="Spry-UI-1.7/includes/plugins/MenuBar2/SpryMenuBarKeyNavigationPlugin.js" type="text/javascript"></script> <script src="Spry-UI-1.7/includes/plugins/MenuBar2/SpryMenuBarIEWorkaroundsPlugin.js" type="text/javascript"></script> <script type="text/javascript"> // <![CDATA[ $(document).ready(function(){ $('#shareButton').click(function(){ var a = $("#watermark").val(); if(a != "What's on your mind?") { $.post("posts.php?value="+a, { }, function(response){ $('#posting').prepend($(response).fadeIn('slow')); $("#watermark").val("What's on your mind?"); }); } }); $('.commentMark').livequery("focus", function(e){ var parent = $('.commentMark').parent(); $(".commentBox").children(".commentMark").css('width','320px'); $(".commentBox").children("a#SubmitComment").hide(); $(".commentBox").children(".CommentImg").hide(); var getID = parent.attr('id').replace('record-',''); $("#commentBox-"+getID).children("a#SubmitComment").show(); $('.commentMark').css('width','300px'); $("#commentBox-"+getID).children(".CommentImg").show(); }); //showCommentBox $('a.showCommentBox').livequery("click", function(e){ var getpID = $(this).attr('id').replace('post_id',''); $("#commentBox-"+getpID).css('display',''); $("#commentMark-"+getpID).focus(); $("#commentBox-"+getpID).children("CommentImg").show(); $("#commentBox-"+getpID).children("a#SubmitComment").show(); }); //SubmitComment $('a.comment').livequery("click", function(e){ var getpID = $(this).parent().attr('id').replace('commentBox-',''); var comment_text = $("#commentMark-"+getpID).val(); if(comment_text != "Write a comment...") { $.post("add_comment.php?comment_text="+comment_text+"&post_id="+getpID, { }, function(response){ $('#CommentPosted'+getpID).append($(response).fadeIn('slow')); $("#commentMark-"+getpID).val("Write a comment..."); }); } }); //more records show $('a.more_records').livequery("click", function(e){ var next = $('a.more_records').attr('id').replace('more_',''); $.post("posts.php?show_more_post="+next, { }, function(response){ $('#bottomMoreButton').remove(); $('#posting').append($(response).fadeIn('slow')); }); }); //deleteComment $('a.c_delete').livequery("click", function(e){ if(confirm('Are you sure you want to delete this comment?')==false) return false; e.preventDefault(); var parent = $('a.c_delete').parent(); var c_id = $(this).attr('id').replace('CID-',''); $.ajax({ type: 'get', url: 'delete_comment.php?c_id='+ c_id, data: '', beforeSend: function(){ }, success: function(){ parent.fadeOut(200,function(){ parent.remove(); }); } }); }); /// hover show remove button $('.friends_area').livequery("mouseenter", function(e){ $(this).children("a.delete").show(); }); $('.friends_area').livequery("mouseleave", function(e){ $('a.delete').hide(); }); /// hover show remove button $('a.delete').livequery("click", function(e){ if(confirm('Are you sure you want to delete this post?')==false) return false; e.preventDefault(); var parent = $('a.delete').parent(); var temp = parent.attr('id').replace('record-',''); var main_tr = $('#'+temp).parent(); $.ajax({ type: 'get', url: 'delete.php?id='+ parent.attr('id').replace('record-',''), data: '', beforeSend: function(){ }, success: function(){ parent.fadeOut(200,function(){ main_tr.remove(); }); } }); }); $('textarea').elastic(); jQuery(function($){ $("#watermark").Watermark("What's on your mind?"); $(".commentMark").Watermark("Write a comment..."); }); jQuery(function($){ $("#watermark").Watermark("watermark","#369"); $(".commentMark").Watermark("watermark","#EEEEEE"); }); function UseData(){ $.Watermark.HideAll(); //Do Stuff $.Watermark.ShowAll(); } }); // ]]> </script> <style type="text/css"> #apDiv4 { position:absolute; left:0px; top:3px; width:auto; height:auto; z-index:21; background-color: #000; } #apDiv5 { position:absolute; left:-1px; top:0px; width:99%; height:54px; z-index:22; background-color: #000; font-size: 14em; } #apDiv6 { position:relative; left:-1px; top:0px; width:99%; height:51px; z-index:22; background-color: #000; text-align: right; } </style> <link href="Spry-UI-1.7/css/Menu/basic/SpryMenuBasic.css" rel="stylesheet" type="text/css"> <style type="text/css"> /* Settable values for skinning a Basic menu via presets. If presets are not sufficient, most skinning should be done in these rules, with the exception of the images used for down or right pointing arrows, which are in the file SpryMenuBasic.css These assume the following widget classes for menu layout (set in a preset) .MenuBar - Applies to all menubars - default is horizontal bar, all submenus are vertical - 2nd level subs and beyond are pull-right. .MenuBarVertical - vertical main bar; all submenus are pull-right. You can also pass in extra classnames to set your desired top level menu bar layout. Normally, these are set by using a preset. They only apply to horizontal menu bars: MenuBarLeftShrink - The menu bar will be horizontally 'shrinkwrapped' to be just large enough to hold its items, and left aligned MenuBarRightShrink - Just like MenuBarLeftShrink, but right aligned MenuBarFixedLeft - Fixed at a specified width set in the rule '.MenuBarFixedLeft', and left aligned. MenuBarFixedCentered - - Fixed at a specified width set in the rule '.MenuBarFixedCentered', and centered in its parent container. MenuBarFullwidth - Grows to fill its parent container width. In general, all rules specified in this file are prefixed by #MenuBar so they only apply to instances of the widget inserted along with the rules. This permits use of multiple MenuBarBasic widgets on the same page with different layouts. Because of IE6 limitations, there are a few rules where this was not possible. Those rules are so noted in comments. */ #MenuBar { background-color:#000000; font-family: Arial, Helvetica, sans-serif; /* Specify fonts on on MenuBar and subMenu MenuItemContainer, so MenuItemContainer, MenuItem, and MenuItemLabel at a given level all use same definition for ems. Note that this means the size is also inherited to child submenus, so use caution in using relative sizes other than 100% on submenu fonts. */ font-weight: normal; font-size: 16px; font-style: normal; padding:0; border-color: #000000 #000000 #000000 #000000; border-width:0px; border-style: none none none none; } /* Caution: because ID+class selectors do not work properly in IE6, but we want to restrict these rules to just this widget instance, we have used string-concatenated classnames for our selectors for the layout type of the menubar in this section. These have very low specificity, so be careful not to accidentally override them. */ .MenuBar br { /* using just a class so it has same specificity as the ".MenuBarFixedCentered br" rule bleow */ display:none; } .MenuBarLeftShrink { float: left; /* shrink to content, as well as float the MenuBar */ width: auto; } .MenuBarRightShrink { float: right; /* shrink to content, as well as float the MenuBar */ width: auto; } .MenuBarFixedLeft { float: left; width: 80em; } .MenuBarFixedCentered { float: none; width: 80em; margin-left:auto; margin-right:auto; } .MenuBarFixedCentered br { clear:both; display:block; } .MenuBarFixedCentered .SubMenu br { display:none; } .MenuBarFullwidth { float: left; width: 100%; } /* Top level menubar items - these actually apply to all items, and get overridden for 1st or successive level submenus */ #MenuBar .MenuItemContainer { padding: 0px 0px 0px 0px; margin: 0; /* Zero out margin on the item containers. The MenuItem is the active hover area. For most items, we have to do top or bottom padding or borders only on the MenuItem or a child so we keep the entire submenu tiled with items. Setting this to 0 avoids "dead spots" for hovering. */ } #MenuBar .MenuItem { padding: 0px 24px 0px 0px; background-color:#000000; border-width:0px; border-color: #cccccc #ffffff #cccccc #ffffff; border-style: none solid none solid; } #MenuBar .MenuItemFirst { border-style: none none none none; } #MenuBar .MenuItemLast { border-style: none solid none none; } #MenuBar .MenuItem .MenuItemLabel{ text-align:center; line-height:1.4em; color:#ffffff; background-color:#000000; padding: 6px 15px 6px 39px; width: 10em; width:auto; } .SpryIsIE6 #MenuBar .MenuItem .MenuItemLabel{ width:1em; /* Equivalent to min-width in modern browsers */ } /* First level submenu items */ #MenuBar .SubMenu .MenuItem { font-family: Arial, Helvetica, sans-serif; font-weight: normal; font-size: 14px; font-style: normal; background-color:#ffffff; padding:0px 2px 0px 0px; border-width:0px; border-color: #cccccc #cccccc #cccccc #cccccc; /* Border styles are overriden by first and last items */ border-style: solid solid none solid; } #MenuBar .SubMenu .MenuItemFirst { border-style: solid solid none solid; } #MenuBar .SubMenu .MenuItemFirst .MenuItemLabel{ padding-top: 6px; } #MenuBar .SubMenu .MenuItemLast { border-style: solid solid solid solid; } #MenuBar .SubMenu .MenuItemLast .MenuItemLabel{ padding-bottom: 6px; } #MenuBar .SubMenu .MenuItem .MenuItemLabel{ text-align:left; line-height:1em; background-color:#ffffff; color:#333333; padding: 6px 12px 6px 5px; width: 7em; } /* Hover states for containers, items and labels */ #MenuBar .MenuItemHover { background-color: #666666; border-color: #cccccc #cccccc #cccccc #cccccc; } #MenuBar .MenuItemWithSubMenu.MenuItemHover .MenuItemLabel{ background-color: #666666; /* consider exposing this prop separately*/ color: #ffffff; } #MenuBar .MenuItemHover .MenuItemLabel{ background-color: #666666; color: #ffffff; } #MenuBar .SubMenu .MenuItemHover { background-color: #666666; border-color: #666666 #cccccc #cccccc #cccccc; } #MenuBar .SubMenu .MenuItemHover .MenuItemLabel{ background-color: #666666; color: #ffffff; } /* Submenu properties -- First level of submenus */ #MenuBar .SubMenuVisible { background-color: #ffffff; min-width:0%; /* This keeps the menu from being skinnier than the parent MenuItemContainer - nice to have but not available on ie6 */ border-color: #ffffff #ffffff #ffffff #ffffff; border-width:0px; border-style: none none none none; } #MenuBar.MenuBar .SubMenuVisible {/* For Horizontal menubar only */ top: 100%; /* 100% is at the bottom of parent menuItemContainer */ left:0px; /* 'left' may need tuning depending upon borders or padding applied to menubar MenuItemContainer or MenuItem, and your personal taste. 0px will left align the dropdown with the content area of the MenuItemContainer. Assuming you keep the margins 0 on MenuItemContainer and MenuItem on the parent menubar, making this equal the sum of the MenuItemContainer & MenuItem padding-left will align the dropdown with the left of the menu item label.*/ z-index:10; } #MenuBar.MenuBarVertical .SubMenuVisible { top: 0px; left:100%; min-width:0px; /* Do not neeed to match width to parent MenuItemContainer - items will prevent total collapse */ } /* Submenu properties -- Second level submenu and beyond - these are visible descendents of .MenuLevel1 */ #MenuBar .MenuLevel1 .SubMenuVisible { background-color: #ffffff; min-width:0px; /* Do not neeed to match width to parent MenuItemContainer - items will prevent total collapse*/ top: 0px; /* If desired, you can move this down a smidge to separate top item''s submenu from menubar - that is really only needed for submenu on first item of MenuLevel1, or you can make it negative to make submenu more vertically 'centered' on its invoking item */ left:100%; /* If you want to shift the submenu left to partially cover its invoking item, you can add a margin-left with a negative value to this rule. Alternatively, if you use fixed-width items, you can change this left value to use px or ems to get the offset you want. */ } /* IE6 rules - you can delete these if you do not want to support IE6 */ /* A note about multiple classes in IE6. * Some of the rules above use multiple class names on an element for selection, such as "hover" (MenuItemHover) and "has a subMenu" (MenuItemWithSubMenu), * giving the selector '.MenuItemWithSubMenu.MenuItemHover'. * Unfortunately IE6 does not support using mutiple classnames in a selector for an element. For a selector such as '.foo.bar.baz', IE6 ignores * all but the final classname (here, '.baz'), and sets the specificity accordingly, counting just one of those classs as significant. To get around this * problem, we use the plugin in SpryMenuBarIEWorkaroundsPlugin.js to generate compound classnames for IE6, such as 'MenuItemWithSubMenuHover'. * Since there are a lot of these needed, the plugin does not generate the extra classes for modern browsers, and we use the CSS2 style mutltiple class * syntax for that. Since IE6 both applies rules where * it should not, and gets the specificity wrong too, we have to order rules carefully, so the rule misapplied in IE6 can be overridden. * So, we put the multiple class rule first. IE6 will mistakenly apply this rule. We follow this with the single-class rule that it would * mistakenly override, making sure the misinterpreted IE6 specificity is the same as the single-class selector, so the latter wins. * We then create a copy of the multiple class rule, adding a '.SpryIsIE6' class as context, and making sure the specificity for * the selector is high enough to beat the single-class rule in the "both classes match" case. We place the IE6 rule at the end of the * css style block to make it easy to delete if you want to drop IE6 support. * If you decide you do not need IE6 support, you can get rid of these, as well as the inclusion of the SpryMenuBarIEWorkaroundsPlugin.js script. * The 'SpryIsIE6' class is placed on the HTML element by the script in SpryMenuBarIEWorkaroundsPlugin.js if the browser is Internet Explorer 6. This avoids the necessity of IE conditional comments for these rules. */ .SpryIsIE6 #MenuBar .MenuBarView .MenuItemWithSubMenuHover .MenuItemLabel /* IE6 selector */{ background-color: #666666; /* consider exposing this prop separately*/ color: #ffffff; } .SpryIsIE6 #MenuBar .MenuBarView .SubMenu .MenuItemWithSubMenuHover .MenuItemLabel/* IE6 selector */{ background-color: #666666; /* consider exposing this prop separately*/ color: #ffffff; } .SpryIsIE6 #MenuBar .SubMenu .SubMenu /* IE6 selector */{ margin-left: -0px; /* Compensates for at least part of an IE6 "double padding" version of the "double margin" bug */ } #apDiv7 { position:absolute; top:17px; width:411px; height:34px; z-index:41; right: 6px; } #apDiv8 { position:relative; left:315px; top:689px; width:476px; height:400px; z-index:40; } </style> <script type="text/xml"> <!-- <oa:widgets> <oa:widget wid="2141544" binding="#MenuBar" /> </oa:widgets> --> </script> </head> <body> <div id="main_container"> welcome <?php echo $username1; ?> <form action="samplea.php" method="post" name="logout"> <input type="submit" name="logout" id="logout" value="Logout"></form> </div> <div id="apDiv4"></div> <div id="apDiv6" align="right"> </div> <div id="apDiv7"> <ul id="MenuBar"> <li><a href="#">Home</a> </li> <li><a href="#">Profile</a></li> <li><a href="#">account</a> </li> </ul> <script type="text/javascript"> // BeginOAWidget_Instance_2141544: #MenuBar var MenuBar = new Spry.Widget.MenuBar2("#MenuBar", { widgetID: "MenuBar", widgetClass: "MenuBar MenuBarLeftShrink", insertMenuBarBreak: true, mainMenuShowDelay: 100, mainMenuHideDelay: 200, subMenuShowDelay: 200, subMenuHideDelay: 200 }); // EndOAWidget_Instance_2141544 </script></div> <h1> </h1> <br clear="all" /><br clear="all" /><br clear="all" /> <br clear="all" /> <!-- FaceBook Button Start, Remove Or leave --><!-- FaceBook Button End, Remove Or leave --> <!-- Stumbleupon Button Start, Remove Or leave --><!-- Stumbleupon Button End, Remove Or leave --> <!-- Digg Button Start, Remove Or leave --><!-- Digg Button End, Remove Or leave --> <!-- Delicious Button Start, Remove Or leave --><!-- Delicious Button End, Remove Or leave --> <!-- Reddit Button Start, Remove Or leave --><!-- Reddit Button End, Remove Or leave --> <!-- Yahoo Button Start, Remove Or leave --><!-- Yahoo Button End, Remove Or leave --><br clear="all" /><br clear="all" /><br clear="all" /> <div id="apDiv1"><?php echo $as; ?></div> <div id="apDiv2"></div><br><br> <div id="apDiv3"><br> <br> <form action="" method="post" name="postsForm"> <div class="UIComposer_Box"> <span class="w"> <textarea class="input" id="watermark" name="watermark" style="height:20px" cols="60"></textarea> </span> <br clear="all" /> <div align="left" style="height:30px; padding:10px 5px;"> <span style="float:left"> </span> <a id="shareButton" style="float:left" class="small button comment"> Share</a> <div align="center"> <br clear="all" /> <div id="posting" align="center"> <p><br> <br> <?php include('dbcon.php'); include_once('posts.php');?> </div> </div> </div> </div> </form>\ </div> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/chat.js"></script> </body> </html>
  13. I did follow the tutorial, but there is php and ajax both in there and I don't want to use all of the code, only what is relevant to what I need............like I said, i am not good at reading code and seeing what works together........I have to make it to know what it does.
  14. could you two stop arguing and help me figure out which piece of code that mjdamato gave me is what I need?
  15. i didn't know exactly where it is in the link that I need to use............I good at making some php......not reading it and other languages.
  16. sorry, I didn't notice you posted the manual. haha sorry
  17. can logouts delete cookies? and i save it in database.
  18. is there any other way to store login data besides for sessions.......needs to be usable with chat.........I have a chat app set up but when the session ends.....it doesn't know who sent the message...............no I don't have acces to the file to change timeout time. any help with this?
  19. so basically what I want is like gmails chat status.........when they logoff different icon from logged on? i don't know whether this is database or what.......but does anyone know how o do this with a database or something else?
  20. Ok so could u give me a sample from job? My webhist has em but i don't know how to use them.
  21. yes so basically I want a div or something to refresh when a database is updated by someone else.......this is for a chat so as soon as the user logs out it will show them as offline.
  22. is there a way with php or jquery to pull info from a database as soon as it is updated? make sense?
  23. so I have decided to do it this way: <?php session_start(); // Must be already set $username1 = $_SESSION['username']; include_once "connect_to_mysql_1.php"; ?><?php if ($_POST['logout']) { $sql = mysql_query("UPDATE sessions SET loggedin='0' where username='$username'")or die(mysql_error()); echo "hello '$username'"; } ?> <?php if(isset($_SESSION['username'])) { $query = "SELECT username, loggedin, name FROM sessions order by loggedin desc"; $result = mysql_query($query) or die('Error : ' . mysql_error()); // create the article list while($row = mysql_fetch_array($result, MYSQL_NUM)) { list($username, $loggedin, $name) = $row; if ($loggedin == 1){ $as .= "<p><a href=\"javascript:void(0)\" onClick=\"javascript:chatWith('$username')\">$name</a> </p>\r\n"; }else if ($loggedin == 0){ $as .= "<p><a href=\"javascript:void(0)\" onClick=\"javascript:chatWith('$username')\">$name</a> </p>\r\n"; }}} ?> only problem is I need to know how to make it so that the current session........my username lets say.....wont show to beable to chat with.....so you cant chat with yourself haha. make sense?
  24. what would I do to make it so that it doesn't completely log them out....but instead it just puts them "asleep" and they just need to click to come online again? also could I get some sample jquery or whatever language..........jquery I am horrible at.
  25. so I want to make a database that basically updates a row called login to 1 when the user is logged in and 0 when off. I am making a chat like thing and the cade will be like .........if $loggedin=0........it will show the user is offline.....if 1 it will show is online........the problem I am running into is like making it so that the user is logged off after lets say 1000 secs of inactivity.....otherwise it will say they are always logged in. is this a good way to do this? or is there a better way? I hope this makes sense.
×
×
  • 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.