Looking to make a simple product list with admin section

Hey All, PHP Newbie Here,

Basically I have a website coded in html/css but I want to add products and have them all on a single page in a list, with side images. Then when they click on the link or image it goes to the product page and I want it to be able to put the image on the page with details and then a Get Quote button that leads to email submit. (O yea, I would love to have an admin section that I can just plug in details and it creates the listing.)

Kinda like the 2 images I provided below.

1st page - List of products

http://i42.tinypic.com/2a9bc5w.png

2nd page - Product details

http://i43.tinypic.com/53u0ed.png

(Sorry it wouldnt let me post the images directly.

Is there any tutorial to show me how to do this or maybe an already pre-made script that I can plug into my website?

Hi there,

There is a website out there that I think you will love. The site is called HotScripts and it has a plethora of scripts for all languages. I can have a field day there looking at all of the scripts they have. Some of them are free and some of them are not. Try looking at this link: http://www.hotscripts.com/category/scripts/php/scripts-programs/e-commerce/. I believe you can find what you are looking for from this point on. If not, I’ll assist you further in finding just what you need for your website.

Hope this helps.

Well I think I am getting it. But I am having issues with the login, check_login pages.

Do I have to set up the login info on the check_login.php? I have it all in the config file.

Here is what I have.

login page
[php] <?php
$login_form = <<<EOD

Username:

Password:

EOD; $msg = $_GET['msg']; //GET the message if($msg!='') echo '

'.$msg.'

'; //If message is set echo it echo "

Please enter your Login Information

"; echo $login_form; ?>[/php]

check_login
[php]<?php
define(DOC_ROOT,dirname(FILE)); // To properly get the config.php file
$username = $_POST[‘username’]; //Set UserName
$password = $_POST[‘password’]; //Set Password
$msg =’’;
if(isset($username, $password)) {
ob_start();
include(DOC_ROOT.’/config.php’); //Initiate the MySQL connection
// To protect MySQL injection (more detail about MySQL injection)
$myusername = stripslashes($username);
$mypassword = stripslashes($password);
$myusername = mysqli_real_escape_string($dbC, $myusername);
$mypassword = mysqli_real_escape_string($dbC, $mypassword);
$sql=“SELECT * FROM login_admin WHERE user_name=’$myusername’ and user_pass=SHA(’$mypassword’)”;
$result=mysqli_query($dbC, $sql);
// Mysql_num_row is counting table row
$count=mysqli_num_rows($result);
// If result matched $myusername and $mypassword, table row must be 1 row
if($count==1){
// Register $myusername, $mypassword and redirect to file “admin.php”
session_register(“admin”);
session_register(“password”);
$_SESSION[‘name’]= $myusername;
header(“location:admin.php”);
}
else {
$msg = “Wrong Username or Password. Please retry”;
header(“location:index.php?msg=$msg”);
}
ob_end_flush();
}
else {
header(“location:index.php?msg=Please enter some username and password”);
}
?>[/php]

I am not sure if I have to set the username and pass in the check_login as well as the config.php

I didnt know how to edit the last post.

Also, all these files are in

domain.com/admin/

Sponsor our Newsletter | Privacy Policy | Terms of Service