Mac Forums

Mac Forums (
-   Web Design and Hosting (
-   -   PHP Help (

knaggsy 08-25-2004 05:45 AM

PHP Help
Hi everyone I am trying to learn php but I am really stuck at the moment with the basics does anyone know of any really good tutorials for php or any websites that have example scripts for me to use or at least base my php pages on?

Any help you could give me would be really appreciated.



gort 08-25-2004 09:49 AM

Best bet is buy a book from amazon.

Murlyn 08-25-2004 12:40 PM

Those are just a couple :)

iSheep 08-25-2004 07:39 PM

I recommend:
PHP for the World Wide Web (Visual QuickStart Guides) ~Larry Ullman (Peachpit Press)

Wonderful book - tought me a lot! It also has a Visual Pro Guide to follow it, and a MySQL with PHP book if you want that as well. Highly recommended.

knaggsy 08-27-2004 06:09 AM

Thanks guys for all of your help I really appreciate it I will be wading my way through those links and hopefully will make sense of it eventually lol Thanks again



design2 10-18-2004 06:53 PM

php help.
i have setup a weblog page where normal users can only view the logs
however if you are successfully logged in i want an EDIT link to appear next to each log and when you click that link it uses that ID to go to my weblog edit page. i thought i had it all covered, but i think i've missed something small.

here's the JUICY code..

if(isset($_SESSION['MM_Username']) && isset($_SESSION['MM_UserAuthorization'])) {
echo '<a href="weblog_edit.php?id=' . $row_rs_weblog['id'] . '">EDIT</a> ';

Murlyn 10-19-2004 01:05 PM

What are you missing? that's only a tiny part of the code and that looks fine from what I can see.. it's not going to throw any errors at least..

design2 10-19-2004 06:20 PM

this is pretty much the weblog page.
but the only part of my php that isnt working is the "edit" which is not appearing next to the logs? my navbar includes work, my database logs work, etc

<?php require_once('Connections/liam_php.php'); ?>
mysql_select_db($database_liam_php, $liam_php);
$query_rs_weblog = "SELECT * FROM weblog ORDER BY `date` DESC";
$rs_weblog = mysql_query($query_rs_weblog, $liam_php) or die(mysql_error());
$row_rs_weblog = mysql_fetch_assoc($rs_weblog);
$totalRows_rs_weblog = mysql_num_rows($rs_weblog);
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<title>Ambury Park Centre for Riding Therapy &gt; News</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="CSS/ambury.css" rel="stylesheet" type="text/css">


design2 10-19-2004 06:22 PM

<?php do { ?>
<p><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"> <br>
<?php echo $row_rs_weblog['date']; ?> - <?php echo $row_rs_weblog['name']; ?><br>
<?php echo $row_rs_weblog['content']; ?>
if(isset($_SESSION['MM_Username']) && isset($_SESSION['MM_UserAuthorization'])) {
echo '<a href="weblog_edit.php?id=' . $row_rs_weblog['id'] . '">EDIT</a> ';
<?php } while ($row_rs_weblog = mysql_fetch_assoc($rs_weblog)); ?>
<p><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><a href="menu.php"><font size="-2">go
to admin menu</font></a></font></p>
<td width="24%" align="right" valign="top">
<?php include("inc/navbar.php"); ?></td>



Murlyn 10-19-2004 07:43 PM

Try putting this above this line like so:

print_r($_SESSION); die;
if(isset($_SESSION['MM_Username']) && isset($_SESSION['MM_UserAuthorization'])) {

And make sure that those two session variables are even being set.

design2 10-20-2004 04:26 AM

actually that didn't work.

instead everything dissapears..
how do i make sure that those two session variables are even being set?
i actually don't know much, i let dreamweaver do it all, and get help
from a php friend.

any more suggestions?

Murlyn 10-20-2004 09:53 AM

If that didn't work, then that means you do not even have a session going. You'll need to start that session.

All times are GMT -4. The time now is 08:06 AM.

Powered by vBulletin
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.