1. E - Commerce Website PHP Tutorial - Setting Up the Pages, Layout, and Templates
Why Stack Overflow recommends it
Stack Overflow users link it as a beginner-friendly walkthrough for learning PHP page templating and database-driven shop sites, though they warn it uses the old mysql functions rather than mysqli.
Recommended by 3 people across 3 different months, 2012 to 2015.
What it is
The first episode of a PHP and MySQL e-commerce tutorial series by Adam Khoury. It sets up the site's pages, a modular layout, and header/footer templates, ahead of building a custom PHP shopping cart with inventory stored in a database.
What people said
Recommends Patrick Meaney · 2012-10 · Stack Overflow · on “Php include_once not working, nothing showing up”
I am just beginning to learn php. I am attempting to use the include_once function in order to include a template header in each of my php sites. (also, this is my first post on this site, and I am not quite sure how it works... just realized the 4-space indent thing) I am watching this video: [this video] And beginning at about minute 19:00, I have entered this code into DW CS5 as advised. This is my index.php file: <body> <div align="center" id="mainWrapper"> <?php inlude_once("/Users/patrickmeaney/localhost/BobsSuits/template_header.php"); ?> <?php include_once dirname("/Users/patrickmeaney/localhost/BobsSuits/template_header.php"); ?> <div id="pageContent"> test</div> <?php inlude_once("templ
Recommends Jon Snow · 2014-12 · Stack Overflow · on “how to do multiple form submissions in php”
For an admin section you could try: session_start(['username']); if (isset($_SESSION['username'])) { $user = $_SESSION['username']; $connect = mysql_connect("localhost","root",""); mysql_select_db("login"); $POST = mysql_query("SELECT * FROM users WHERE username='$user'"); while ($row = mysql_fetch_assoc($POST)) { $admin = $row['account']; } if ($admin ==0) die("You're not an admin <a href='member.php'>Main menu</a>"); } else die("You must be logged in <a href='index.php'>Back</a>"); ?> Add account as one of your database column tables. This is a useful tutorial to follow: [this video] Users table: CREATE TABLE IF NOT EXISTS `users` ( `userid` int(11) NOT NULL AUTO_INCREMENT, `firstname` varchar(
Recommends MEOWPLATES · 2015-03 · Stack Overflow · on “Trying to show full size image from thumbnails retrieved using php and database”
Yeah you got it! Now once you've got a better grasp of how to do it you'll be able to utilize the above code as it seems that you're not fully educated on the power of PHP! Here's a really good resource to get started, I know it's a video and it's about making a shop but it's all relevant and it got me going with PHP! [this video] Also, in order to use your ID in a script just echo the ID as normal but wrap it in it's own php tags -Also, only pay attention to the PHP as he is still using mysql to query the databse and not mysqli!