Tutorial advise for my middle size ecommerce projet


Hi everybody,

I am working on my middle size ecommerce website, and i want to how display images with their corresponding information from the database. I know that we cannot store physical images in the database execpt their names, but still how to associate them with the corresponding physical images. I have some knowlegde of php/mysql (though i am still learning), i think this projet will confront and imporove my skiils.

could anyone please give me a link for that tutorial or any other pdf tutorial ?


There is so many things about e-commerce you have to take into consideration and it’s hard to know what those things are until you actually go through the process.

The best advice anyone can give you on taking on a e-commerce site (which is a huge task) it to go through the code and functionality of open source e-commence sites. There are a lot of them that do exactly what you’re asking.

Here’s a good list of a bunch of open source ones.

I know that we cannot store physical images in the database execpt their names,

Not true. Images can be stored in the database. Whether you should or not is something else.


Building your own eCommerce site. There is another edition on the way, but it will be a few months.


i would to know some corresponding PDO to mysqli object-oriented:

I know this is PDO:
$sql = ‘SELECT id FROM joke WHERE authorid = :id’;
$s = $pdo->prepare($sql);
$s->bindValue(’:id’, $_POST[‘id’]);

How can i write this in mysqli obeject-oriented?

to what the PDO element ‘:id’ correspond in mysqli object oriented ?



Something like:
$sql = ‘SELECT id FROM joke WHERE authorid=’ . $_POST[‘id’];
$s = mysqli_query($db_connect, $sql);


Ummm, no.


LOL, sorry, edit will fix the missing equal sign… Sorry, typed it off my sleepy mind…
(and the db connection… Man, need to go to bed early tonight!)


Also missing the prepared statement aspect. It would look more like this:

if (!filter_var($_POST[‘id’], FILTER_VALIDATE_INT) || $_POST[‘id’] < 0)
throw new Exception(“Invalid ID passed”);

$stmt = $con->prepare(‘SELECT id FROM joke WHERE authorid = ?’);
$stmt->bind_param(“i”, (int)$_POST[‘id’] );