Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Redredc

  • Rank
  • Birthday 07/07/1998
  1. Like I said earlier in my first post, I removed those lines to see if that was the problem, which it wasn't. As for the connection, I have connected it to my server's database. I'm only showing you the necessary code for what you should need to figure this out. If you want, I can show you the code for how I'm doing it. Don't worry. I have it coded to where it's only visible to me. For each portion of coding, I put in: if(isset($_SESSION['user']) && $_SESSION['user']=='Redredc'){ (insert text here) } else echo'You do not have the correct access to enter this page! <a onClick="goBack()" style="color:blue;">Click Here</a> to go back, or <a href="/index.php">Click Here</a> to return home.';
  2. Are you familiar witth "responsive" design with CSS? It's not very hard if you're familiar with both languages. It goes as follows: @media screen and (insert "max-width:" along with a specific width here) and (insert "min-width:" along with a specific width here){...} For example: @media screen and (max-width:767px) and (min-width:480px){..} Now let's assume each of your images are normally 500px in width, and 500px in height. And let's also assume the description's font size is exactly 1.0000em (16px). You can now change these sizes any way you want with responsive design. I'll show you how you can change it: @media screen and (max-width:767px) and (min-width:480px){ img.gallery{ width:300px; height:300px; } p.description{ font-size:0.7500em; } } I hope it helps! ps. if you want to see how it looks in a mobile browser, you can press the "Restore Down" button in the top right corner (right beside the X button), and change your screen's sizes that way. And if you want to see what it looks like in specific devices, here is a link: mattkersley.com/responsive/
  3. I see "../index.php". I'll just show you every bit of coding: ---/admin/pages.php--- echo'<form action="edit_page.php" method="get"> <p>Type in a url (this site only) starting with "../" and type the rest in as if you were doing a self-hosted link. For example: "../index.php"</p> <input type="text" name="url"/> <input type="submit" value="Edit Page"/> </form>'; ---/admin/edit_page.php--- $url=$_GET['url']; $edit=fopen(''.$url.'','r') or die('Unable to open file.'); $read=fread($edit,filesize($url)); echo'<form action="confirm_edit.php" method="post"> <textarea width="90%" height="200px" name="edit"> '.$read.' </textarea><br/> You are currently editing: <input type="text" name="page" value="'.$url.'"/> <input type="submit" value="Edit Page"/> </form>'; ---/admin/confirm_edit.php--- $edit=$_POST['edit']; $page=$_POST['page']; $file=fopen($page,'w'); if(!mysql_query($file)){ die('Error: '.mysql_error()); } else fwrite($file,$page);
  4. It's a local file path. I tried editing my index.php (which is one folder backwards, so it's "../index.php") page. It's a series of three links (because I couldn't find any other way to do it) and I can show you the coding for each of them.
  5. Hey, guys. I'm having trouble with something, and I'm hoping you can help. I'm trying to have it to where you can edit files directly on the website itself. But the problem is, is when I go to edit them, I get an error, and it immediately takes me to my error 403 page that I've set up. So I changed it to permission 777 (and then immediately changed it back afterward, it is now on 644) to see if that was the problem, but I got the same result every time. I was hoping you could take a look at my code, and see if you could tell me what's happening. $edit=$_POST['edit']; $page=$_POST['page']; $file=fopen($page,'w'); if(!mysql_query($file)){ die('Error: '.mysql_error()); } else fwrite($file,$page); Please let me know if you can figure out the problem. And I've also tried removing the 4th 5th and 6th line to see if that was the problem, but still nothing has changed.
  • Create New...