Jump to content

searls03

Members
  • Posts

    907
  • Joined

  • Last visited

Everything posted by searls03

  1. is there a way to make the form submit when I use a hidden field with the correct name? I am using the Javascript for an automatic form run......but it doesn't run if I put the fields into it.........
  2. Honestly, I should have known that. I don't know what I was thinking. Thanks for that thorpe.
  3. with this form action page, how do I make it so that the form submits, without the submit actually being present? (that is the entire form that I gave you): if ($_POST['myForm']) { $q = "UPDATE messages SET read1='1'where id='".$_GET['id']."'"; $sql = mysql_query($q) or die("Problem with the query: $q<br>" . mysql_error());
  4. how do I put a get id into this form, or use $myvar?: <form action='read2.php?id=' method="post" name='myForm' id="myForm"></form>
  5. is there supposed to be a php.ini file?
  6. was giving me a link to google a joke or what? (by the way, I have tried to search, but can't seem to find a related topic.)
  7. is there anyway to prevent a sessions from expiring to soon. I believe they are 20 minute sessions, correct. Even if they are not 20 min. is there a way to prevent it from happening?
  8. how do I make it beside it?
  9. any thing to help me get started?
  10. yes, but I couldn't really think of the right keywords.
  11. is there any google suggestions you could give me to help me get started? is it possible in that format?
  12. is there a way for php to calculate age based on birthdate with mm/dd/yyyy format? or do I need some converter? if so, how?
  13. and the page source makes it look like its fine: <table id='1' width="1200" border="0" cellspacing="0" cellpadding="0"> <tr> <th width="246" scope="col"><br /> Sender</th> <th width="954" scope="col">Subject</th> </tr> <tr> <td align="left" valign="top" scope="col"> </td> <td align="left" valign="top" scope="col"></td> </tr> </table><table border='0' cellpadding='0' cellspacing='0' width='1200'> <tr bgcolor='#CCCC99'><td width='274'><strong>Aaron Searls</strong></td><td width='1025'> <a href=/message.php?id=61>test</a></td></tr><br /> <table border='0' cellpadding='0' cellspacing='0' width='1200'> <tr bgcolor='#CCCC99'><td width='274'><strong>Aaron Searls</strong></td><td width='1025'> <a href=/message.php?id=60>test</a></td></tr><br /> <table border='0' cellpadding='0' cellspacing='0' width='1200'> <tr bgcolor='#CCCC99'><td width='274'><strong>Aaron Searls</strong></td><td width='1025'> <a href=/message.php?id=59>test</a></td></tr><br /> <table border='0' cellpadding='0' cellspacing='0' width='1200'> <tr bgcolor='#CCCC99'><td width='274'><strong>Aaron Searls</strong></td><td width='1025'> <a href=/message.php?id=58>test</a></td></tr><br /> </div> <br /><br /> <!-- InstanceEndEditable --> <div class="push"></div></div> <div class="footer"> <div id="1"><img src="footer_scout.png" width="1290" height="63" border="0" usemap="#Map" /> <map name="Map" id="Map"> <area shape="rect" coords="525,5,630,31" href="myprofile.php" /> <area shape="rect" coords="672,6,753,32" href="register.php" /> <area shape="rect" coords="793,6,845,33" href="news.php" /> </map> </div> </div>
  14. what it is, this comes from a template made in dreamweaver.......that why it so long..............and the footer-sc/ad is just a picture inside of a php file. I know it is something in this code because the table/div is supposed to end before the footer begins. there is more than one table because there are four different possibility of places for it to go, either to message.php, reply.php, read.php, or read1.php.......So they need to be in more than one table or they never worked.
  15. i will send you a pm with login credentials that you can use.
  16. ok, I was thinking it was some php cause of how the table layout is actually in php tags, which is what I am guessing is messing it up, but I don't know. Do you have any suggestions?
  17. And I do believe this is more of a php/html question, not just html.
  18. sorry, I had forgotten to post code first.
  19. ok, so I have this code and it is always making the last cell move down if I add line breaks after the </div> (wrapper) tag. Why does it do this? does this make sense? if not let me know......(this is hard to describe!) <?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['id'])) { 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.php"; // Place Session variable 'id' into local variable $userid = $_SESSION['id']; // Query member data from the database and ready it for display $sql = mysql_query("SELECT * FROM members WHERE userid='$userid' LIMIT 1"); while($row = mysql_fetch_array($sql)){ $name = $row["name"]; $phone = $row["phone"]; $username = $row["username"]; $address = $row["address"]; $city = $row["city"]; $state = $row["state"]; $zip = $row["zip"]; $cell = $row["cell"]; $email = $row["email"]; $accounttype = $row["accounttype"]; $rank = $row["rank"]; $badges = $row["badges"]; $userid = $row["userid"]; } ?> <?php include 'config.php'; include 'opendb.php'; // if no id is specified, list the available articles if(!isset($_GET['id'])) { $query = "SELECT * FROM messages WHERE recipient ='$name' order by date desc"; $result = mysql_query($query) or die('Error : ' . mysql_error()); // create the article list while($row = mysql_fetch_array($result, MYSQL_NUM)) { list($from1, $recipient, $title1, $content, $id, $date, $read) = $row; if ($read == "1"){ $content1 .= "<table border='0' cellpadding='0' cellspacing='0' width='1200'> <tr><td valign='top' width='274'> $from1</td> <td valign='top' border='1' width='1025'><a href='/message.php?id=$id'>$title1</a></td></tr><br /> "; }else{ $content1 .= "<table border='0' cellpadding='0' cellspacing='0' width='1200'> <tr bgcolor='#CCCC99'><td width='274'><strong>$from1</strong></td><td width='1025'> <a href=/message.php?id=$id>$title1</a></td></tr><br /> "; }} }else { // get the article info from database $query = "SELECT * FROM messages WHERE recipient='$name' ORDER by date desc"; $result = mysql_query($query) or die('Error : ' . mysql_error()); $row = mysql_fetch_array($result, MYSQL_ASSOC); $title = $row['title']; $content = $row['content']; $to = $row['recipient']; $from = $row['from1']; $id = $row['id']; $read = $row['read']; } // if no id is specified, list the available articles if(!isset($_GET['id'])) { $self = $_SERVER['PHP_SELF']; $query = "SELECT * FROM comments WHERE recipient='$name' order by date desc"; $result = mysql_query($query) or die('Error : ' . mysql_error()); // create the article list while($row = mysql_fetch_array($result, MYSQL_NUM)) { list($com_id, $userid, $id1, $id, $recipient, $comment, $sender, $title, $date, $read) = $row; if ($read == "1"){ $content1 .= "<table border='0' cellpadding='0' cellspacing='0' width='1200'> <tr><td valign='top' width='274'>$sender</td> <td valign='top' width='1025'> <a href='/reply.php?com_id=$com_id'>$title</a></td></tr><br /> "; }else { $content1 .= "<table border='0' cellpadding='0' cellspacing='0' width='1200'> <tr bgcolor='#CCCC99'><td valign='top' width='274'><strong>$sender</strong></td> <td valign='top' width='1025'><a href='read1.php?com_id=$com_id'>$title</a> </form></td></tr><br /> "; echo "</table>"; } } } else { // get the article info from database $query = "SELECT * FROM comments WHERE recipient='$name' order by date desc"; $result = mysql_query($query) or die('Error : ' . mysql_error()); $row = mysql_fetch_array($result, MYSQL_ASSOC); $userid = $row['userid']; $id1 = $row['id1']; $id = $row['messageid']; $recipient = $row['recipient']; $comment = $row['comment']; $sender = $row['sender']; $title = $row['title']; $read = $row['read']; } include 'closedb.php'; ?> <!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"><!-- InstanceBegin template="/Templates/template2.dwt.php" codeOutsideHTMLIsLocked="false" --> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <!-- InstanceBeginEditable name="doctitle" --> <title>Untitled Document</title> <!-- InstanceEndEditable --> <style type="text/css"> body { background-image: url(button/boyscout1.png); background-repeat: no-repeat; position: relative; } #menu { position:relative; left:160px; top:0px; width:931px; height:59px; z-index:19; } #menu #MenuBar1 li a { color: #000; border-top-style: outset; border-right-style: outset; border-bottom-style: outset; border-left-style: outset; width: 100px; } #status { position:relative; left:16px; top:180px; width:124px; height:44px; z-index:14; } </style> <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script> <script type="text/javascript"> 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];}} } </script> <!-- InstanceBeginEditable name="head" --> <style type="text/css"> #editregion { position:absolute; left:-8px; top:272px; width:1293px; height:auto; z-index:500; text-align: center; clear: none; float: none; font-family: "Times New Roman sans-serif"; } body { background-image: url(button/boyscout1.png); background-repeat: no-repeat; position: relative; } #menu { position:relative; left:160px; top:0px; width:931px; height:59px; z-index:19; } #menu #MenuBar1 li a { color: #000; border-top-style: outset; border-right-style: outset; border-bottom-style: outset; border-left-style: outset; width: 100px; } #status { position:relative; left:16px; top:180px; width:124px; height:44px; z-index:14; } </style> <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script> <script type="text/javascript"> 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];}} } </script> <script type="text/javascript"> 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];}} } </script> <style type="text/css"> #apDiv1 { position:relative; left:11px; top:0px; width:1200px; height:auto; z-index:400; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: thin; border-right-width: thin; border-bottom-width: thin; border-left-width: thin; } #apDiv2 { position:relative; left:0px; top:33px; width:600; height:auto; z-index:400;} #editregion #apDiv1 table tr th { text-align: left; ; font-family: "Times New Roman sans-serif"; } #editregion #apDiv1 table tr td { text-align: left; } #editregion #apDiv1 table tr td { font-weight: normal; font-size: 1em; font-family: 'Georgia','Verdana','Arial','sans-serif'; } input.link { font-family: 'Georgia','Verdana','Arial','sans-serif'; font-size: 1em; text-align: left; font-weight:bold; color:#91282C; background: none; margin: 0; padding: 0; border: none; cursor: pointer; top:auto; border-top:none; margin-bottom:0; -moz-user-select: text; } input.link1 { font-family: 'Georgia','Verdana','Arial','sans-serif'; font-size: 1em; text-align: left; font-weight:normal; color:#black; background: none; margin: 0; padding: 0; border: none; top:auto; cursor:text; border-top:none; margin-bottom:0; -moz-user-select: text; } input.link1 span { text-decoration:none; } input.link2 { font-family: 'Georgia','Verdana','Arial','sans-serif'; font-size: 1em; text-align: left; font-weight:bold; color:#black; background: none; margin: 0; padding: 0; border: none; top:auto; cursor:text; border-top:none; margin-bottom:0; -moz-user-select: text; } input.link2 span { text-decoration:none;} input.link span { text-decoration: underline; } input.link:hover { color:black; } input.link:focus span { color: brown; } body { font-family: "Times New Roman" sans-serif; } a:link, a:visited { color: blue; } hover { color: black; } a:focus, a:active { color: blue; } </style> <style type="text/css"> body,td,th { font-family: "Times New Roman sans-serif"; } </style> <style type="text/css"> hover { color: #F00; } #editregion #apDiv1 table tr td { font-size: 1em; } #editregion #apDiv1 table tr td strong { font-family: Georgia, Verdana, Arial, Sans-Serif; font-size: 14px; font-weight: bold; } #editregion #apDiv1 #1 tr td { font-family: Georgia, Verdana, Arial, Sans-Serif; font-size: 1em; } #editregion #apDiv1 #table { position:relative; } #editregion #apDiv2 #apDiv1 #1 tr td { text-align: left; } </style> <style type="text/css"> #apDiv3 { position:absolute; left:22px; top:-33px; width:177px; height:23px; z-index:501; } #editregion #apDiv3 { text-align: left; } #editregion #apDiv2 #apDiv1 { text-align: left; } </style> <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" /> <style type="text/css"> #logout { position:relative; left:0px; top:0pxpx; width:134px; height:38px; z-index:20; font-weight: bold; font-size: 24px; } #logout a { color: #000; } #status { text-align: center; } #logout1 { position:absolute; left:1071px; top:191px; width:224px; height:61px; z-index:2; } #menu2 { position:absolute; left:-1px; top:172px; width:497px; height:92px; z-index:20; } #footer { position:fixed; left:-10px; width:1290px; height:63px; z-index:500; color: #000; background-color: #000; right: 0px; bottom: 0px; } </style> <!-- InstanceEndEditable --> <!-- InstanceParam name="id" type="text" value="apDiv6" --> <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" /> <style type="text/css"> #logout { position:relative; left:0px; top:0pxpx; width:134px; height:38px; z-index:20; font-weight: bold; font-size: 24px; } #logout a { color: #000; } #status { text-align: center; } #logout1 { position:absolute; left:1071px; top:191px; width:224px; height:61px; z-index:2; } #menu2 { position:absolute; left:-1px; top:172px; width:497px; height:92px; z-index:20; } * { padding: 0; } html, body { height: 100%; } .wrapper { min-height: 75%; height: auto !important; height: 75%; padding: 0 auto -1em; } .footer, .push { height: 1em; clear: both; } </style> </head> <body> <div id="menu2"><div id="menu"> <ul id="MenuBar1" class="MenuBarHorizontal"> <li><a href="myprofile.php">My Profile</a> </li> <li><a href="register.php">Register</a></li> <li><a href="dashboard.php">Dashboard</a> </li> <li><a href="news.php">News</a></li> <?php if ($accounttype == "Admin") { ?> <li><a href="membermanager.php">Scout Manager</a></li> <li><a href="eventmanager.php">Event Manager</a></li> <li><a href="newsmanager.php">News Manager</a></li> </ul><?php } ?> </div></div> <div id="logout1"><div id="logout"><a href="logout.php">Logout</a></div></div> <div id="status"><?php echo "$accounttype"; ?> <br /><?php echo "$name"; ?> <p> </p> </div><br /><br /><br /><br /><br /><br /><br /><br /><br /> <br /> <br /> <div class="wrapper"><!-- InstanceBeginEditable name="EditRegion3" --> <div id="apDiv3"><?php if ($accounttype == "Admin") { echo "<form action=\"/newmess.php?mod=post#\" method=\"post\"><input name=\"submit\" type=\"submit\" value=\"Compose new message!\" /></form>";} ?><?php if ($accounttype == "Scout Master") { echo "<form action=\"newmess.php?mod=post#\" method=\"post\"><input name=\"submit\" type=\"button\" value=\"Compose new message!\" /></form>";} ?></div> <div id="apDiv1"> <table width="1200" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="1270" height="27" bgcolor="#C5C0B7" scope="col"><strong><strong>Message Board</strong></strong></td> </tr> </table> <table id='1' width="1200" border="0" cellspacing="0" cellpadding="0"> <tr> <th width="246" scope="col"><br /> Sender</th> <th width="954" scope="col">Subject</th> </tr> <tr> <td align="left" valign="top" scope="col"> </td> <td align="left" valign="top" scope="col"></td> </tr> </table><?php echo $content1; ?> </div> <!-- InstanceEndEditable --> <div class="push"></div></div> <div class="footer"><?php if($accounttype == "Admin"){include_once "footer-ad.php";}else if($accounttype == "Scout Master"){ include_once "footer-ad.php";} else { include_once "footer-sc.php"; } ?> </div> <script type="text/javascript"> var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"}); </script> </body> <!-- InstanceEnd --></html>
  20. how do you make it so that a radio button is either checked or unchecked based on database?
  21. How do I make a footer at the bottom of the page no matter on screen size? I use an include file for the footer but on The test computer I use i can position it on bottom of page. But on a bigger screened one it does not. How do I do this?
×
×
  • 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.