Forum Moderators: coopster
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!
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
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.
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