Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 08-25-2008, 06:50 PM   #1 (permalink)
 
Newb Techie

Join Date: Jul 2008

Posts: 9

Hatter Madigan is on a distinguished road

Default Admin Editing

I don't know PHP. How could I make an ACP where you could edit the main page from the site?

Thanx.
Hatter Madigan is offline  
Old 08-25-2008, 08:13 PM   #2 (permalink)
CrazeD's Avatar
 
Wizard Techie

Join Date: Feb 2006

Location: Maine

Posts: 3,683

CrazeD will become famous soon enough

Send a message via AIM to CrazeD Send a message via MSN to CrazeD
Default Re: Admin Editing

You...learn PHP, or another server side programming language.
__________________

Need website help? PM me!
CrazeD is offline  
Old 08-25-2008, 09:36 PM   #3 (permalink)
 
Newb Techie

Join Date: Jul 2008

Posts: 9

Hatter Madigan is on a distinguished road

Default Re: Admin Editing

That's not very helpful

~Hatter
Hatter Madigan is offline  
Old 08-25-2008, 09:44 PM   #4 (permalink)
CrazeD's Avatar
 
Wizard Techie

Join Date: Feb 2006

Location: Maine

Posts: 3,683

CrazeD will become famous soon enough

Send a message via AIM to CrazeD Send a message via MSN to CrazeD
Default Re: Admin Editing

Well, it's like asking how to assemble a car without knowing how to use the tools.

What you want to do has the potential of being complicated.

Learn the basics of PHP and then I will help you write the script.

PHP Tutorial
PHP: A simple tutorial - Manual
PHP Tutorial - Introduction
PHP MySQL Tutorial
__________________

Need website help? PM me!
CrazeD is offline  
Old 08-27-2008, 12:12 AM   #5 (permalink)
 
Newb Techie

Join Date: Jan 2006

Posts: 39

smartydebater

Default Re: Admin Editing

Do you have any programming experience? Basic html and css? I wouldn't recommend learning php without good knowledge of at least those. I'm going to assume you do. So you'll have to learn Php. The best place to learn it for free is at w3 schools: PHP Tutorial

To help you here are the main things you'll need to do: (Also remember that there are many free php scripts online, that you can change to fit your needs. Why waste time doing what others have already done for you?)

You'll need an html login page. If you want to have the login on every page of your site I'd recommend using the php require function inside of your html like this(but make sure you save the html file as .php then and have your server set to automatically correctly process .php files):
PHP Code:
<?php
require_once('login.php')
?>
The html for the page will just be a simple login form like this:
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>
<title>Login Form</title>
</head>

<body>
<form action="action.php" method="post">
 <p><b>Username:</b> <input type="text" name="Username" /></p>
 <p><b>Password:</b> <input type="password" name="Password" /></p>
 <p><input type="submit" /></p>
</form>
</body>
</html> 
Notice how this is using the post method. (You can also you the get method, but then the data will be stored in the url after a question mark. So you should stay away from "get" in this case.) The post method basically sends the data to global php variables.. which are in this php script action.php which the html form sends it's data to once submitted.
PHP Code:
<?php
  $username 
$_REQUEST['Username'];
  
$password $_REQUEST['Password'];
if ((
$username == "yourusername") && ($password == "yourpassword")) {
    echo 
"<html><!-- Remember to escape all apostrophes by putting a backslash before them like this: \' or \" inside of the php tags. Here's where you would put an html form that would print out the current html file inside of an input field and allow you to edit it and submit it and it would upload over the file. If you actually make it this far, than reply in the thread and ask for more specific help on uploading files. Also note that this way of doing it isn't really secure at all if you don't do it correctly because people can submit data to the php file that would do the upload by making their own html form, so you really need the php upload file to re validate the users login credentials.. So if you don't know what you're doing, it'd be better to place the admin page in a protected folder using apache (.htaccess and .htpasswd files) -->
"
;
} else {
    echo 
"<html>You entered the wrong username and/or password.</html>";
}
?>
But if you didn't want to edit the html by hand, then you'd just want to install a content mangement system. Hope this is more helpful to you than the other users.
smartydebater is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
need help with a build-minor gaming and home video editing :) siddanth3 Building, Buying, or Upgrading High Performance PC Systems 15 08-26-2008 01:05 PM
Windows asking me for password almightyobo Windows Operating Systems and Software 17 07-07-2008 10:04 PM
Whats a good video editing laptop for about $800 dario03 Everything Laptops 3 04-15-2008 10:14 AM
Admin password lost akasixcon Windows Operating Systems and Software 5 04-02-2008 08:33 PM
Gaming/Vid Editing Rig thatsinsane Building, Buying, or Upgrading High Performance PC Systems 1 01-28-2008 08:32 PM