Jump to content

ev5unleash

Members
  • Posts

    181
  • Joined

  • Last visited

    Never

Everything posted by ev5unleash

  1. Hi everyone, I'm not that good with Javascript but let me tell you what I'm trying to do. I'm trying to make a button that will make a color code in a textbox as the background color. Could someone help me with what the onClick action should be for the button? Thanks! http://ev5unleash.dnsalias.org:1212/bgtest.htm
  2. Hey Guys, I'm trying to make a page with a table that has a background image. I want to be able to create a button that will change the table background image to something else. http://ev5unleash.dnsalias.org:1212/websites/sbsolution/index.html <!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Evan's Smartboard Solution</title> <script type="text/javascript"> <!-- function MM_popupMsg(msg) { //v1.0 alert(msg); } //--> </script> --> </style> <link href="hpstype.css" rel="stylesheet" type="text/css" /> </head> <body> <table id="tblbg" class="wizard" border="0" align="center"> <tr> <td width="9" height="21"> </td> <td colspan="3"> </td> <td width="10"> </td> </tr> <tr> <td height="417"> </td> <td colspan="3" align="left" valign="top"><table width="100%" border="0"> <tr> <td width="87%" class="windowheader">Welcome - Setup Wizard (1.0)</td> <td width="13%" align="right"> <input name="button2" type="button" id="button2" onclick="MM_popupMsg('Press and hold Alt + F4 to close.')" value="X" /> </td> </tr> </table> <p class="text">Weclome to Evan's Smartboard Solution (Rev. 1), This wizard will guide you though how to use the smartboard solution and get everything working in no time.</p> <p class="text"> <input type="button" name="button" id="button" value="Button" onmousedown="document.getElementById('tblbg').src='systemfiles/images/red7x5.png';" /> </p> <p> </p></td> <td> </td> </tr> <tr> <td> </td> <td width="135" valign="top"> <input type="button" name="Exit" id="Exit" onclick="MM_popupMsg('Press and hold Alt + F4 to close.')" value="Exit" /> </td> <td width="366" align="center" valign="top"><input type="button" name="Start" id="Start" value="Start Smartboard Solution" /></td> <td width="158" align="right" valign="top"><input type="button" name="Next" id="Next" value="Next" /></td> <td> </td> </tr> </table> </body> </html>
  3. I'm trying to use image maps on my page but it seems something I'm doing in W3C's is wrong. Please tell me what this error message means and how I could fix it. http://validator.w3.org/check?uri=http://ev5unleash.dnsalias.org:85/websites/biosite/layout.html;accept=text/xml,application/xml,application/xhtml%2Bxml,text/html;q%3D0.9,text/plain;q%3D0.8,image/png,*/*;q%3D0.5;accept-language=en-US,en;accept-charset=ISO-8859-1,*,utf-8 Thanks, Evan <!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Biology Educational Website</title> <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];}} } 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_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];} } function MM_validateForm() { //v4.0 if (document.getElementById){ var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments; for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]); if (val) { nm=val.name; if ((val=val.value)!="") { if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@'); if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n'; } else if (test!='R') { num = parseFloat(val); if (isNaN(val)) errors+='- '+nm+' must contain a number.\n'; if (test.indexOf('inRange') != -1) { p=test.indexOf(':'); min=test.substring(8,p); max=test.substring(p+1); if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n'; } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; } } if (errors) alert('The following error(s) occurred:\n'+errors); document.MM_returnValue = (errors == ''); } } //--> </script> <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body onload="MM_preloadImages('/websites/biologywebsite/images/links/homeovr.png','/websites/biologywebsite/images/links/lessonsovr.png','/websites/biologywebsite/images/links/quizovr.png','/websites/biologywebsite/images/links/aboutovr.png')"> <table align="center" class="homepage"> <tr> <td width="150" rowspan="2" align="center" valign="top"> </td> <td height="15" colspan="2" align="right" valign="top"> </td> </tr> <tr> <td width="736" height="100" align="right" valign="top"><form id="login" name="login" method="post" action="login.php"> <label><span class="textbox">Username </span> <input name="Username" type="text" class="textbox" id="Username" /> <span class="textbox">Password</span> <input name="Password" type="password" class="textbox" id="Password" /> <input name="loginbutton" type="submit" class="textbox" id="loginbutton" onclick="MM_validateForm('Username','','R','Password','','R');return document.MM_returnValue" value="Login" /> </label> </form></td> <td width="21" align="right" valign="top"> </td> </tr> <tr> <td width="150" height="28" align="center" valign="top"><a href="#"><img src="images/links/home.png" alt="Home" name="Image1" width="130" height="28" id="Image1" onmouseover="MM_swapImage('Image1','','/websites/biologywebsite/images/links/homeovr.png',1)" onmouseout="MM_swapImgRestore()" /></a></td> <td colspan="2" rowspan="6"> </td> </tr> <tr> <td height="25" align="center" valign="top"><a href="#"><img src="images/links/lessons.png" alt="Lessons" width="130" height="28" id="Image2" onmouseover="MM_swapImage('Image2','','/websites/biologywebsite/images/links/lessonsovr.png',1)" onmouseout="MM_swapImgRestore()" /></a></td> </tr> <tr> <td height="25" align="center" valign="top"><a href="#"><img src="images/links/quiz.png" alt="Quiz's" width="130" height="25" id="Image3" onmouseover="MM_swapImage('Image3','','/websites/biologywebsite/images/links/quizovr.png',1)" onmouseout="MM_swapImgRestore()" /></a></td> </tr> <tr> <td height="25" align="center" valign="top"><a href="#"><img src="images/links/about.png" alt="About" width="130" height="28" id="Image4" onmouseover="MM_swapImage('Image4','','/websites/biologywebsite/images/links/aboutovr.png',1)" onmouseout="MM_swapImgRestore()" /></a></td> </tr> <tr> <td height="653" align="center" valign="top"> </td> </tr> <tr> <td align="center" valign="top"><img src="/websites/biosite/images/w3c.png" width="120" height="105" border="0" usemap="#Map" /></td> </tr> </table> <map name="Map" id="Map"> <area shape="rect" coords="8,4,105,52" href="http://www.w3c.com" alt="W3C.com" /> <area shape="rect" coords="19,55,97,74" href="http://validator.w3.org/check?uri=referer" alt="XHTML Validation" /> <area shape="rect" coords="36,77,79,98" href="http://jigsaw.w3.org/css-validator/check/referer" alt="CSS Validation" /> </map> </body> </html>
  4. I need to use CSS? Because I need the table background to be specified there and not in the CSS. Is there any work around that I can do to make it valid other than dealing with the CSS?
  5. I'm a little stumped by why my site is not being validated correctly. Could someone point me in the right direction to what I should fix to make my site Validated by W3C's Validation? http://ev5unleash.dnsalias.org:85/websites/biosite/layout.html. http://validator.w3.org/check?uri=http://ev5unleash.dnsalias.org:85/websites/biosite/layout.html&charset=(detect+automatically)&doctype=Inline&group=0 Thanks, Evan <!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <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];}} } 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_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];} } function MM_validateForm() { //v4.0 if (document.getElementById){ var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments; for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]); if (val) { nm=val.name; if ((val=val.value)!="") { if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@'); if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n'; } else if (test!='R') { num = parseFloat(val); if (isNaN(val)) errors+='- '+nm+' must contain a number.\n'; if (test.indexOf('inRange') != -1) { p=test.indexOf(':'); min=test.substring(8,p); max=test.substring(p+1); if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n'; } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; } } if (errors) alert('The following error(s) occurred:\n'+errors); document.MM_returnValue = (errors == ''); } } //--> </script> <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body onload="MM_preloadImages('/websites/biologywebsite/images/links/homeovr.png','/websites/biologywebsite/images/links/lessonsovr.png','/websites/biologywebsite/images/links/quizovr.png','/websites/biologywebsite/images/links/aboutovr.png')"> <table width="921" height="1096" border="0" align="center" background="images/homepage.png"> <tr> <td width="150" rowspan="2" align="center" valign="top"> </td> <td height="15" colspan="2" align="right" valign="top"> </td> </tr> <tr> <td width="736" height="100" align="right" valign="top"><form id="login" name="login" method="post" action="login.php"> <label><span class="textbox">Username </span> <input name="Username" type="text" class="textbox" id="Username" /> <span class="textbox">Password</span> <input name="Password" type="password" class="textbox" id="Password" /> <input name="loginbutton" type="submit" class="textbox" id="loginbutton" onclick="MM_validateForm('Username','','R','Password','','R');return document.MM_returnValue" value="Login" /> </label> </form></td> <td width="21" align="right" valign="top"> </td> </tr> <tr> <td width="150" height="28" align="center" valign="top"><a href="#"><img src="images/links/home.png" alt="Home" name="Image1" width="130" height="28" id="Image1" onmouseover="MM_swapImage('Image1','','/websites/biologywebsite/images/links/homeovr.png',1)" onmouseout="MM_swapImgRestore()" /></a></td> <td colspan="2" rowspan="6"> </td> </tr> <tr> <td height="25" align="center" valign="top"><a href="#"><img src="images/links/lessons.png" alt="Lessons" width="130" height="28" id="Image2" onmouseover="MM_swapImage('Image2','','/websites/biologywebsite/images/links/lessonsovr.png',1)" onmouseout="MM_swapImgRestore()" /></a></td> </tr> <tr> <td height="25" align="center" valign="top"><a href="#"><img src="images/links/quiz.png" alt="Quiz's" width="130" height="25" id="Image3" onmouseover="MM_swapImage('Image3','','/websites/biologywebsite/images/links/quizovr.png',1)" onmouseout="MM_swapImgRestore()" /></a></td> </tr> <tr> <td height="25" align="center" valign="top"><a href="#"><img src="images/links/about.png" alt="About" width="130" height="28" id="Image4" onmouseover="MM_swapImage('Image4','','/websites/biologywebsite/images/links/aboutovr.png',1)" onmouseout="MM_swapImgRestore()" /></a></td> </tr> <tr> <td height="712" align="center" valign="top"> </td> </tr> <tr> <td align="center" valign="top"><a href="http://jigsaw.w3.org/css-validator/check/referer"><img src="/websites/biosite/images/w3c.png" width="115" height="80" alt="W3C Valid CSS" /></a></td> </tr> </table> </body> </html>
  6. I've tried this on every browser including Safari, Google Chrome, Firefox, Opera, and Internet Explorer and my site works perfectly. I only have a problem with Internet Explorer 7 and lower. If you can see when you mouse over the navigation the menu pops out way off from being right next to the button. Is there any IE hack you guys could make for me so that I don't have a problem with IE? Thanks. Link: http://www1.ev5unleash.com:1212/websites/biologywebsite/indexlayout.html
  7. Hi, I'm currently working on a website and I'm having trouble with a cell being spaced out in Firefox and Internet Explorer. Although the space doesn't appear in any Webkit browser. I try making sure that Cellspacing and padding are 0 but the tiny gap in inbetween the top cell and the bottom ones is still there. Any ideas? Link : http://www1.ev5unleash.com:1212/websites/biologywebsite/indexlayout.html Code <!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Biology Educational Website </title> <link href="style.css" rel="stylesheet" type="text/css" /> <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script> <link href="SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- body { background-image: url(images/200717041506-1877.jpg); text-align: center; } --> </style> <link href="/SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" /> </head> <body> <table width="999" height="748" border="0" align="center" cellspacing="0" cellpadding="0"> <tr> <td height="110" colspan="3" align="right" valign="top" background="images/images/tblbg_01.png"class="text" cellspacing="0" cellpadding="0"></td> </tr> <tr> <td width="88" height="634" align="center" valign="top" background="images/images/tblbg_02.png"> <table width="88" border="0"> <tr> <td width="96" align="center"><ul id="MenuBar1" class="MenuBarVertical"> <li><a href="?" class="text">Home</a></li> <li><a class="MenuBarItemSubmenu" href="#"><span class="text">Lessons</span></a> <ul> <li><a href="#" class="text">Start Lessons</a></li> <li><a href="#" class="text MenuBarItemSubmenu"><strong>Unit 1 - Biology</strong></a> <ul> <li><a href="?id=lessons&chapter=1" class="text">Chapter 1 - The Basics</a></li> <li><a href="?id=lessons&chapter=2" class="text">Chapter 2 - Ecosystems</a></li> <li><a href="?id=lessons&chapter=3" class="text">Chapter 3 - Populations</a></li> <li><a href="?id=lessons&chapter=4" class="text">Chapter 4 - Humans</a></li> </ul> </li> <li><a href="#" class="text MenuBarItemSubmenu"><strong>Unit 2 - Cells</strong></a> <ul> <li><a href="?id=lessons&chapter=5" class="text">Chapter 5 - The Cell</a></li> <li><a href="?id=lessons&chapter=6" class="text">Chapter 6 - Energy and the Cell</a></li> <li><a href="?id=lessons&chapter=7" class="text">Chapter 7 - Cell Life</a></li> </ul> </li> <li><a href="#" class="text MenuBarItemSubmenu"><strong>Unit 3 - Genetics</strong></a> <ul> <li><a href="?id=lessons&chapter=8" class="text">Chapter 8 - Genetics in General</a></li> <li><a href="?id=lessons&chapter=9" class="text">Chapter 9 - DNA/RNA</a></li> </ul> </li> <li><a href="#" class="text MenuBarItemSubmenu"><strong>Unit 4 - Evolution</strong></a> <ul> <li><a href="?id=lessons&chapter=10" class="text">Chapter 10 - Darwin's Theory</a></li> <li><a href="?id=lessons&chapter=11" class="text">Chapter 11 - Evolution of Populations</a></li> <li><a href="?id=lessons&chapter=12" class="text">Chapter 12 - History</a></li> </ul> </li> </ul> </li> <li><a href="#" class="MenuBarItemSubmenu"><span class="text"><span class="text">Tests</span></span></a> <ul> <li><a href="?id=test&chapter=1" class="text">Chapter 1 Test</a></li> <li><a href="?id=test&chapter=2" class="text">Chapter 2 Test</a></li> <li><a href="?id=test&chapter=3" class="text">Chapter 3 Test</a></li> <li><a href="?id=test&chapter=4" class="text">Chapter 4 Test</a></li> <li><a href="?id=test&chapter=5" class="text">Chapter 5 Test</a></li> <li><a href="?id=test&chapter=6" class="text">Chapter 6 Test</a></li> <li><a href="?id=test&chapter=7" class="text">Chapter 7 Test</a></li> <li><a href="?id=test&chapter=8" class="text">Chapter 8 Test</a></li> <li><a href="?id=test&chapter=9" class="text">Chapter 9 Test</a></li> <li><a href="?id=test&chapter=10" class="text">Chapter 10 Test</a></li> <li><a href="?id=test&chapter=11" class="text">Chapter 11 Test</a></li> <li><a href="?id=test&chapter=12" class="text">Chapter 12 Test</a></li> </ul> </li> <li><a href="?id=teacherlogin" class="text">Teacher Portal</a></li> </ul></td> </tr> </table> </td> <td width="910" padding="0" align="left" valign="top" background="images/images/tblbg_03.png"> <table width="895" height="620" border="0" cellpadding="0" cellspacing="0" background="/websites/biologywebsite/images/tbltxt.png"> <tr> <td align="left" valign="top"><p class="heading1">Welcome </p> <p class="text">Welcome to the Biology Education Website, this website is designed to teach and quiz everyone about Biology. This Website offers lessons on individual parts including the basics of Biology, Cells, Genetics and Evolution. This website includes games, quizes, tests, and much more . It's an easy way to teach a student or yourself everything there is to know about Biology.</p> <p></p></td> </tr> </table> </td> </tr> </table><table width="1000" height="50" border="0" align="center" background="images/infobar.png"> <tr> <td align="center" class="text">This website was created by Evan Janusziewicz. Other images and content have been mentioned on the Sources Cited Page.</td> </tr> </table> <p> </p> <script type="text/javascript"> <!-- var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"SpryAssets/SpryMenuBarRightHover.gif"}); //--> </script> </body> </html>
  8. I'm still running into a similar problem. Now when a wrong code is inserted I get a blank response not the indexfailed.php
  9. I mean when you put ?id=teachauth you get a blank screen instead of the indexfailed.php.
  10. The code is this now <?php if(isset($_GET['code'])) //add this line switch(strtolower($_GET['code'])) { case 'lnvb773c2y': include('indexsucessful.php'); break; default: include('indexfailed.php'); break; } ?> Now when nothing is put in for the code it's blank and does not point to the login failed page. Although, now it does when a wrong include is put in with no error.
  11. Although I marked this as topic solved I have one problem for the default code. When you submit the wrong include like ?code=sdjfh9 people get this error message. Notice: Undefined index: id in C:\wamp\www\websites\biologywebsite\pages\teacherresources\auth.php on line 10 any ideas?
  12. The code worked with the "The Little Guys" code, I was also stuck because for some reason PHP wouldn't let me link index.php for the include on the auth.php file. Thanks for pointing out the loginfailed.php error, it was indexfailed.php.
  13. I'm still getting this error Warning: include(loginfailed.php) [function.include]: failed to open stream: No such file or directory in C:\wamp\www\pages\teacherresources\auth.php on line 11
  14. Okay here's the root of the main file index.php (which has teacherresource and teacherauth include in it. \index.php (withholds the code below) <?php include('indextop.php'); if( !isset($_GET['id']) ) { $xid = 'default'; } else { $xid = strtolower($_GET['id']); } switch($xid) { case 'default': include('indexhome.php'); break; case 'teacherlogin': include('pages/teacherresources/login.php'); break; case 'teacherauth': include('pages/teacherresources/auth.php'); break; } include('indexbottom.php'); ?> \pages\teacherresources\auth.php (withholds the code below) <?php if( !isset($_GET['code']) ) { $xid = 'default'; } else { $xid = strtolower($_GET['id']); } switch($xid) { case 'default': include('loginfailed.php'); break; case 'Lnvb773c2y': include('index.php'); break; case 'spage1': include('../../pagespage1.php'); break; } ?> \pages\teacherresources\index.php (Shows the message when the login is successful) \pages\teacherresources\indexfailed.php (Shows the message when the login has failed) \pages\teacherresources\login.php (has the login page) will
  15. Okay, I updated auth.php file so now it's <?php if( !isset($_GET['code']) ) { $xid = 'default'; } else { $xid = strtolower($_GET['id']); } switch($xid) { case 'default': include('loginfailed.php'); break; case 'Lnvb773c2y': include('index.php'); break; case 'spage1': include('../../pagespage1.php'); break; } ?> Now when I try "?id=teacherauth" I get the message Warning: include(/loginfailed.php) [function.include]: failed to open stream: No such file or directory in C:\wamp\www\websites\biologywebsite\pages\teacherresources\auth.php on line 15
  16. Hi, I'm currently making a website with PHP Include so that I can easily edit it. I currently have this code to include different pages <?php include('indextop.php'); if( !isset($_GET['id']) ) { $xid = 'default'; } else { $xid = strtolower($_GET['id']); } switch($xid) { case 'default': include('indexhome.php'); break; case 'teacherlogin': include('pages/teacherresources/login.php'); break; case 'teacherauth': include('pages/teacherresources/auth.php'); break; } include('indexbottom.php'); ?> Which let's me make a certain page show when the ?id=teachlogin is shown. Now I have the part teacher auth, which leads to the php file of this code <?php if( !isset($_GET['code']) ) { $xid = 'default'; } else { $xid = strtolower($_GET['id']); } switch($xid) { case 'default': include('pages/teacherresources/loginfailed.php'); break; case 'Lnvb773c2y': include('pages/teacherresources/index.php'); break; case 'spage1': include('pagespage1.php'); break; } ?> When I try "?id=teacherauth?code=Lnvb773c2y" or "?id=teacherauth&code=Lnvb773c2y" The page other than the top and the bottom code is blank. Can anyone tell me why when I include multiple times it won't show the page that's included? Thanks.
  17. Thanks all for the help, the problem was fixed when I applied the base of killah's code.
  18. I'm still getting this same error Notice: Undefined index: id in C:\wamp\www\index.php on line 5
  19. Hi, I've recently updated my PHP server and when I did this I've had a couple of problems with the script switch(strtolower($_GET['id'])) // 'content' before when I used this code I didn't get a notice message of an Undefined index. Does anyone have an alternative code for this one? Currently using: 5.2.8 Full PHP Code <?php include('./indextop.php'); // header switch(strtolower($_GET['id'])) // 'content' { case "page2": include("pages/page2.php"); break; case "spage1": include("pagespage1.php"); break; default: include("indexhome.php"); break; } include('./indexbottom.php'); // footer ?>
  20. Hmm, I inserted the solution into my code but now whenever anything gets included it shows a black page. <?php switch(strtolower($_POST['user'])) // 'content' { *Other code blocked out* case "ev5unleash": $a=file_get_contents("homepage/ev5unleash/967456database956745.php"); break; default: include("loginincorrect.php"); break; } ?>
  21. I have currently been using this same type of code for awhile in a lot of including code. When I updated my Apache and PHP the whole thing I put together stopped working. I was looking through fourms and I see that the PHP hass been updated and you can no longer use it. Although I'm using this same code to power the navigation on my site (http://www.ev5unleash.com) I don't see it being a problem. When I use it on different parts of my site I get this error Code: <?php switch(strtolower($_POST['user'])) // 'content' { [i]Other code blocked out...[/i] case "ev5unleash": include("homepage/ev5unleash/967456database956745.php"); break; default: include("loginincorrect.php"); break; } ?> Warning: include() [function.include]: URL file-access is disabled in the server configuration in homepage/ev5unleash/967456database956745.php on line 9 Please help!
×
×
  • 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.