Jump to content

bftwofreak

Members
  • Posts

    62
  • Joined

  • Last visited

    Never

About bftwofreak

  • Birthday 08/13/1992

Contact Methods

  • AIM
    mydubrules
  • Website URL
    http://65.6.138.219/church

Profile Information

  • Gender
    Male
  • Location
    NC

bftwofreak's Achievements

Member

Member (2/5)

0

Reputation

  1. Well the mysql object is defined in another file that include()'s this php page. Should the member 'server' result in a string data type if it's from the XML file?
  2. I've been getting the following error since I implemented an xml file to hold certain variable values. Fatal error: Call to a member function getElementsByTagName() on a non-object in F:\Website\church\req\install\db_conn.php on line 12 This is the xml document: <?xml version="1.0" encoding="utf-8"?> <settings> <server>se.r.v.er</server> <login>root</login> <pass>password</pass> </settings> and this is the php file <?php if (isset($_SESSION['form']) && $_SESSION['form'] == $_POST['form']) { } else { $_SESSION['form'] = rand(0,100000000); echo '<td style="align: center; width: 100%;">'; if (DB_FILE_EXISTS) { echo '<u>Current Settings</u><br/>'; print_r('Server: ' . $mysql->getElementsByTagName('server') . '<br/>'); print_r('Login: ' . $mysql->getElementsByTagName('login') . '<br/>'); print_r('Password: ' . $mysql->getElementsByTagName('pass') . '<br/>'); } echo '<br/><br/>'; echo '<form method="post"><input type="hidden" name="form" value="' . $_SESSION['form'] . '">'; echo '<input type="text" name="server">'; echo '<input type="text" name="login">'; echo '<input type="password" name="pass">'; echo '<input type="submit" value="Submit"></form>'; } ?> There is another file that opens the xml document as a new DOM document. Any ideas as to why I'm getting this error? Line 12 is the linke trying to display the server value.
  3. edit.php: <?php $sql = 'SELECT * FROM schedule WHERE id=' . $_REQUEST['id']; $results = mysql_query($sql); $_SESSION['form'] = rand(0,10000); while ($row = mysql_fetch_array($results)) { $body .= '<form action="?pg=Admin&sub=Schedule&s=e&id=' . $_GET['id'] . '" method="Post" enctype="multipart/form-data"> <input type="hidden" name="form" value="' . $_SESSION['form'] . '"> <table width="100%" border="1px"><tr><td colspan="2" style="text-align:center;">Subject: <input type="text" name="subject" size="30" value="' . $row['subject'] . '"></td></tr> <tr><td style="text-align:left" width="50%">When: <input type="text" name="date" size="30" value="' . date('F j, Y g:i A',$row['date']) . '"></td> <td style="text-align:right" width="50%">Where: <input type="text" name="location" size="30" value="' . $row['location'] . '"></td></tr> <td colspan="2" style="text-align:center"><textarea name="description" rows="5" cols="50">' . $row['description'] . '</textarea></td></tr> <tr><td colspan="2" style="text-align:center;"><input type="submit" value="Post"></td></table></form>'; } ?> I don't really see where or how, but if you find something then please point it out.
  4. Error reporting is listed in my header page. My index page include()'s my header page and this page. (As well as others with the header page at the top). Edited the query: <?php unset($_SESSION['form'],$_POST['form']); $sql = 'UPDATE schedule SET subject="' . $_POST['subject'] . '", date=' . $_POST['date'] . ', location="' . $_POST['location'] . '", description="' . $_POST['description'] . '" WHERE id=' . $_GET['id']; if (mysql_query($sql)) { $body .= 'The scheduled event was updated succesfully!'; } else { $body .= 'There was an error!'; include('edit.php'); $body .= mysql_error(); } ?> No dice... still returns 'There was an error!', but no reason given. The mysql_query() and the Error reporting show absolutely nothing... Anything else?
  5. $sql = 'UPDATE schedule SET subject="' . $_POST['subject'] . '", date=' . $_POST['date'] . ', location="' . $_POST['location'] . '", description="' . $_POST['description'] . ' WHERE id=' . $_GET['id']; if (mysql_query($sql)) { $body .= 'The scheduled event was updated succesfully!'; } else { $body .= 'There was an error!'; include('edit.php'); $body .= mysql_error(); } In the following code, my form updates my database for a scheduled event. The issue is that my page feeds back that there's an error, but mysql_error() does not report an error and neither does the php error reporting. Any explanations, tips, changes I can make?
  6. Sorry. I found the issue out myself. I have <script language="text/javascript"> in the code above. I merely changed the language attribute to type. thanks anyway.
  7. If anyone wants to take a look into this issue go to http://65.6.138.219/church. This is a home hosted test location in which I have no url yet. At the homepage, run your mouse over any of the bottom 3 navigation links. There should be a small sub-menu that appears just a slight bit to the right of each. I'm not sure as to why they won't execute properly, but feel free to take a look at the source and tell me if you notice anything.
  8. I've tried nearly a hundred times to get this to work. This is what I have now and what I thought would work. <script language="text/javascript"> function Home(){ var myLayer = document.getElementById("Home"); if(myLayer.style.display=="none" || myLayer.style.display==""){ myLayer.style.display="block"; } else { myLayer.style.display="none"; } } function Information(){ var myLayer = document.getElementById("Information"); if(myLayer.style.display=="none" || myLayer.style.display==""){ myLayer.style.display="block"; } else { myLayer.style.display="none"; } } function Members(){ var myLayer = document.getElementById("Members"); if(myLayer.style.display=="none" || myLayer.style.display==""){ myLayer.style.display="block"; } else { myLayer.style.display="none"; } } function News(){ var myLayer = document.getElementById("News"); if(myLayer.style.display=="none" || myLayer.style.display==""){ myLayer.style.display="block"; } else { myLayer.style.display="none"; } } function Schedule(){ var myLayer = document.getElementById("Schedule"); if(myLayer.style.display=="none" || myLayer.style.display==""){ myLayer.style.display="block"; } else { myLayer.style.display="none"; } } function User(){ var myLayer = document.getElementById("User"); if(myLayer.style.display=="none" || myLayer.style.display==""){ myLayer.style.display="block"; } else { myLayer.style.display="none"; } } </script> <div id="navigation"> <a class="link" style="top:8px;" href="?pg=Home" onmouseover="javascript:Home()" onmouseout="javascript:Home()">Home</a> <a class="link" style="top:58px;" href="?pg=Information" onmouseover="javascript:Information()" onmouseout="javascript:Information()">Information</a> <a class="link" style="top:108px;" href="?pg=Members" onmouseover="javascript:Members()" onmouseout="javascript:Members()">Members</a> <a class="link" style="top:158px;" href="?pg=News" onmouseover="javascript:News()" onmouseout="javascript:News()">News</a> <a class="link" style="top:208px;" href="?pg=Schedule" onmouseover="javascript:Schedule()" onmouseout="javascript:Schedule()">Schedule</a> <a class="link" style="top:258px;" href="?pg=User" onmouseover="javascript:User()" onmouseout="javascript:User()">User</a> </div> <!-- End Navigation --> <!-- Begin Content --> <div id="content"> Welcome Mark. </div> <table id="Members" class="sub_container" style="top: 200px; display: none;" onmouseover="javascript:Members()" onmouseout="javascript:Members()"> <tr><td><a href="?pg=Members&sub=List">List</a></td></tr> <tr><td><a href="?pg=Members&sub=Edit">Edit</a></td></tr> </table><table id="News" class="sub_container" style="top: 229px; display: none;" onmouseover="javascript:News()" onmouseout="javascript:News()"> <tr><td><a href="?pg=News&sub=All">All</a></td></tr> <tr><td><a href="?pg=News&sub=Week">Week</a></td></tr> <tr><td><a href="?pg=News&sub=Month">Month</a></td></tr> <tr><td><a href="?pg=News&sub=Create">Create</a></td></tr> </table><table id="Schedule" class="sub_container" style="top: 258px; display: none;" onmouseover="javascript:Schedule()" onmouseout="javascript:Schedule()"> <tr><td><a href="?pg=Schedule&sub=Week">Week</a></td></tr> <tr><td><a href="?pg=Schedule&sub=Month">Month</a></td></tr> <tr><td><a href="?pg=Schedule&sub=Create">Create</a></td></tr> </table><table id="User" class="sub_container" style="top: 287px; display: none;" onmouseover="javascript:User()" onmouseout="javascript:User()"> <tr><td><a href="?pg=User&sub=Edit">Edit</a></td></tr> <tr><td><a href="?pg=User&sub=Logout">Logout</a></td></tr> </table> I only have the necessary js code and html coding. I'm no veteran when it comes to js and the only reason that there are so many js functions is because a new one is generated by php code for each link in my navigation bar. The issue is that the submenus for each link will not appear at all until I change the initial visibility to "block". is there some error in my code?
  9. I'm trying to do a simple appear/disappear trick with a submenu that appears onmouseover the button and the submenu and disappears 1 second after mouseout of the submenu and the button. Below is the javascript code. var t function showMenu(id) { clearTimeout(t); document.getElementById(id).style='visibility: visible;'; } function hideMenu(id) { t=setTimeout(document.getElementById(id).style='visibility:hidden;',1000); } Below is the final html of the page after a system of php files contribute. <!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>New Vision Church</title> <link rel="stylesheet" type="text/css" href="req/style.css" /> <script language="text/javascript" src="req/submenu.js"></script> </head><body> <div id="corner" class="top-left"><img src="images/top-left.gif" /></div> <div id="title" class="title"><img src="images/title.gif" /><p class="title_text">New Vision Presbyterian NCD</p></div> <div id="Links" class="links"><img src="images/links.gif" /><br /> <a class="link" style="top:8px;" href="?pg=Home" onmouseover="showMenu('Home')" onmouseout="hideMenu('Home')">Home</a> <img src="images/links.gif" /><br /> <a class="link" style="top:58px;" href="?pg=User" onmouseover="showMenu('User')" onmouseout="hideMenu('User')">User</a> <img src="images/links-bottom.gif" /></div> <div id="User" class="sub_div" style="top:180px" onmouseover="showMenu('User')" onmouseout="hideMenu('User')"><table> <tr><td><a class="sub_link" href="?pg=User&sub=Login">Login</a></td></tr> <tr><td><a class="sub_link" href="?pg=User&sub=Register">Register</a></td></tr> </table></div><div id="body" class="body"></div> </body></html> My issue is that I already have the div with the id of User set to be hidden. My problem is that the submenu won't appear. is it an issue with the final html or an issue with the JS?
  10. <?php error_reporting(E_ALL); if ($_POST['rand'] == 'updom') { if ($_FILES['file']['error'] > 0) { echo 'An error has occured'; } else { $target_path = $_SERVER['DOCUMENT_ROOT'] . '/uploads/'; $name = $_POST['name']; $target_path = $target_path . $name; move_uploaded_file($_FILES['file']['tmpname'],$target_path); echo basename($_FILES['file']['name']) . ' has been uploaded successfully'; } } else { echo '<form method="post" enctype="multipart/form-data" > <input type="hidden" name="rand" value="updom" /><br> Filename: <input type="text" name="name" value="" /><br> File: <input type="file" name="file" /><br> <input type="submit" value="Upload" /> </form>'; } ?> My mistake but you don't have to be an ass... I understand that you are a senior programmer, but why be a bastard to the rest of the forum community? Here's the code if anyone else wishes to assist me. Much appreciated
  11. Whenever I upload a file using the following php script, everything processes correctly and I get the dialog that says that the file uploaded correctly... however, the file does not show up in any directory...
  12. well it works if you go to sig.halo3.updominon.com/index.php, the code works, but I'll eliminate the text and see what happens...
×
×
  • 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.