Forum Moderators: coopster

Message Too Old, No Replies

Need to ramp up on PHP quickly.

where do I start?

         

Craig_F

6:41 pm on May 12, 2004 (gmt 0)

10+ Year Member



I'm currently using a set up that allows me to do glorified search and replace functions using a DB and templates with variables in them. Works great for smaller sized product catalogs, but the catalog I'm working ith now is just too big for that.

Where would I start with PHP and mysql? All I really need is to be able to grab fields from a DB and plop them into a template (no ordering, or log in systems), which I think is pretty simple, but each tutorial I look at they seem to go too far beyond what I need.

Anyone know an really easy way to get started with doing this? Key for me is time, I had everything ready to go and I hit the wall with my current set up, so now I'm behind deadline until I can sort this out.

Thanks!

henry0

8:08 pm on May 12, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Craig, if each of those templates serve only one need and are not used in a login, multiple users environment
try that

if session are required - start session from the very code top
then in your template
<?
include ("include_fns.php");
// bunch of DB connect funtions
?>

<? // this is how you plug content in.
include ("includes/mission_statement.inc.php");
?>

example of include:

<?
$conn = db_connect();
$sql= "select mission_statement from group_1
where id=$id"; // you can either enter the ID in the template or in the include or even froget about "Where"
$result = mysql_query($sql,$conn);
while ($new_content=mysql_fetch_array($result) ){
print $new_content[mission_statement];
}
?>

hope it helps

Craig_F

2:23 pm on May 13, 2004 (gmt 0)

10+ Year Member



that does help somewhat henry, but even though it does seem simple, I'm sure I'd be fussing with things for weeks if I tried to set up something on my own, and I don't really have that kind of time.

I'm wondering if there's something out of the box that might work. I've been looking at oscommerce, which is overkill feature wise, but seems like it would make it easy to make my catalog dynamic and allow me to use templates. The only issue there that I can see is that I don't need online ordering, I'd need to be able to switch out the "Buy" button for a link to a page of contact details about the ordering process instead.

anyone have any other ideas? I'm just kind of making it up as I go here and I'd love some more pointers.

thanks.

Spook

3:11 pm on May 13, 2004 (gmt 0)

10+ Year Member



If you like OS Commerce, take a look at zen-cart.

Its based on OSC but, and I'm no coder, the OSC code is apparently very messy. The zen-cart team are slowly ironing out the wrikles.

I, for one, find it much easier to follow.

Spook

henry0

3:42 pm on May 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Craig
I understand that you are busy
However every bit of PHP code or PHP + MySQL
Requires at least some understanding of coding

Which we are here to help you getting a grip on

Now about OScomm, I have been for a few years using it
It is highly manageable
And there are tons of hacks (in the good sense of the term!) and support that is available

if you need any link please let me know

Henry