New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
Web Design and Hosting Creating sites, scripting, and hosting discussions.

PHP Help


Post Reply New Thread Subscribe

 
Thread Tools
knaggsy
Guest
 
Posts: n/a

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.

Cheers

Tim
QUOTE Thanks
gort

 
Member Since: Jul 25, 2004
Location: Gaithersburg, MD
Posts: 389
gort is on a distinguished road
Mac Specs: Mac Pro 2.6ghz Quad Xeon, 23" Cinema

gort is offline
Best bet is buy a book from amazon.
QUOTE Thanks
Murlyn

 
Murlyn's Avatar
 
Member Since: Jun 11, 2003
Location: Mount Vernon, WA
Posts: 4,909
Murlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to all
Mac Specs: MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2

Murlyn is offline
http://www.devshed.com/
http://www.digiways.com/
http://www.entropy.ch/
http://www.juicystudio.com/
http://www.melonfire.com/
http://www.phpbuilder.com/
http://www.php.net/
http://php.resourceindex.com/
http://www.thickbook.com/
http://www.totalscripts.com/
http://www.webmonkey.com/
http://www.zend.com/

Those are just a couple
QUOTE Thanks
iSheep
Guest
 
Posts: n/a

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.
QUOTE Thanks
knaggsy
Guest
 
Posts: n/a

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

cheers

Tim
QUOTE Thanks
design2
Guest
 
Posts: n/a

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..

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

 
Murlyn's Avatar
 
Member Since: Jun 11, 2003
Location: Mount Vernon, WA
Posts: 4,909
Murlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to all
Mac Specs: MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2

Murlyn is offline
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..
QUOTE Thanks
design2
Guest
 
Posts: n/a

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'); ?>
<?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">
<html>
<head>
<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">
</head>

<body>
QUOTE Thanks
design2
Guest
 
Posts: n/a

<?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']; ?>
<?php
if(isset($_SESSION['MM_Username']) && isset($_SESSION['MM_UserAuthorization'])) {
echo '<a href="weblog_edit.php?id=' . $row_rs_weblog['id'] . '">EDIT</a> ';
}
?>
</font>
<?php } while ($row_rs_weblog = mysql_fetch_assoc($rs_weblog)); ?>
<p></p>
<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>
<p></p>
</div>
</td>
<td width="24%" align="right" valign="top">
<?php include("inc/navbar.php"); ?></td>
</tr>

</table>

</body>
</html>
<?php
mysql_free_result($rs_weblog);
?>
QUOTE Thanks
Murlyn

 
Murlyn's Avatar
 
Member Since: Jun 11, 2003
Location: Mount Vernon, WA
Posts: 4,909
Murlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to all
Mac Specs: MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2

Murlyn is offline
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.
QUOTE Thanks
design2
Guest
 
Posts: n/a

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?
QUOTE Thanks
Murlyn

 
Murlyn's Avatar
 
Member Since: Jun 11, 2003
Location: Mount Vernon, WA
Posts: 4,909
Murlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to all
Mac Specs: MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2

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

Post Reply New Thread Subscribe


« RSS for newbs? | Apple website font »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Is it possible to setup php and databases on pc and mac? knaggsy Web Design and Hosting 7 08-05-2004 06:09 AM
PHP form with html? design2 Web Design and Hosting 19 05-18-2004 05:08 AM
Enabling PHP JGarcia Web Design and Hosting 3 03-05-2004 09:35 PM
Bogus PHP bug on Mac OS X... mark Web Design and Hosting 19 10-03-2003 07:34 PM
PHP help urble Web Design and Hosting 1 08-11-2003 10:22 AM

All times are GMT -4. The time now is 07:52 AM.

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

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?