Search found 6 matches

by james.aimonetti
Wed Feb 14, 2007 2:45 pm
Forum: PHP - Code
Topic: Problem with the admin area?
Replies: 1
Views: 422

After the first SQL query, it does not look like you define $row. So when you test whether $row['user_admin'] == 'y', it will return false. Also, I might suggest that, assuming the user_admin column is a binary data type ('y' or 'n'), that you change the second test of $row['user_admin'] to an else ...
by james.aimonetti
Mon Feb 12, 2007 1:07 am
Forum: PHP - Code
Topic: Newbie in PHP
Replies: 3
Views: 838

If you are using PHP5, I think it is more proper to declare member variables using public / private / protected. http://www.php.net/manual/en/language.oop5.php outlines the functionality and code used in creating classes with PHP5. For PHP4, see http://www.php.net/manual/en/language.oop.php to educa...
by james.aimonetti
Mon Feb 12, 2007 12:54 am
Forum: PHP - Code
Topic: Expanding column listing
Replies: 2
Views: 556

One option would be to load the reviews into a hidden div, and use a javascript onclick event to unhide the div. Server-side, the button could be in its own form that submits back to the same page but with a hidden variable set to toggle loading of reviews on the page. A little AJAX could be used if...
by james.aimonetti
Sun Feb 11, 2007 1:38 am
Forum: PHP - Code
Topic: Javascript - getElementByType ... PHP got any same function?
Replies: 3
Views: 1416

The dark art of regular expressions could be your friend. http://php.net/pcre describes native PHP solutions. There are also plenty of tutorials that help with creating an appropriate regexp to extract data from strings.
by james.aimonetti
Sun Feb 11, 2007 1:30 am
Forum: PHP - Code
Topic: PHP Programming
Replies: 5
Views: 1558

http://pear.php.net is also a pretty sweet resource with an easy installation procedure. Look for the HTTP_Request and HTTP_Client packages; see if either meets your need or helps you get closer to a solution. Also, if you are maintaining the other URL, doing a XML_RPC server and client is pretty si...
by james.aimonetti
Fri Feb 09, 2007 2:20 pm
Forum: PHP - Code
Topic: string question
Replies: 7
Views: 612

Everah | Please use , and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: :arrow: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]...