Re: [PHP] URL file-access disabled

2005-03-31 Thread Jackson Linux
My provider has provided me the solution: adding php_flag allow_url_fopen on to the .htaccess Apologies to the list for wasting time and bandwidth. Jack On 31 Mar 2005, at 17:47, Jackson Linux wrote: Hi, ho, I have a problem; something which works locally is complaining on the BSD Unix server I

[PHP] URL file-access disabled

2005-03-31 Thread Jackson Linux
Hi, ho, I have a problem; something which works locally is complaining on the BSD Unix server I use: The Code: (somewhere else I define $image_dir) $image = ($article['image']); $size1 = getimagesize("$image_dir"."$image"); $width1 = $size1[0]; $height1 = $size1[1]; include_once(INCLUDES . 'im

[PHP] Newbie Define Paths question

2005-03-31 Thread Jackson Linux
Hi, I've set the following: $nscfg['url'] ='http://www.domain.com/'; $nscfg['secure_url'] ='https://domain.com/'; $nscfg['site root'] = '/Users/username/public_html/'; $nscfg['base'] = 'http://www.domain.com/'; // For use in the HTML documents define ("URL", $nscfg['url']); // where to find Article

Re: [PHP] NEWBIE: Can't Get My Loop Going. . .

2005-03-29 Thread Jackson Linux
As usual, Jochem, thanks for all those useful tips. They are much appreciated. Jack On 29 Mar 2005, at 05:15, Jochem Maas wrote: Jackson Linux wrote: Hello all, I am a newbie trying to build a set of links to content in a db. I am connecting with the db and seeing the proper number of rows. if

[PHP] Newbie Question - an If in an Array?

2005-03-28 Thread Jackson Linux
I'm so confused. I have an array : $display[] = " {$cv['dates']} {$cv['job_title']} {$cv['company']} {$cv['job']}"; In SOME of the rows of this table, there is a field called sidebar. I'd like to have this array include a reference to this field if it exis

Re: [PHP] NEWBIE: Can't Get My Loop Going. . .

2005-03-28 Thread Jackson Linux
Sorry folks. I have been told by a more knowledgeable friend that the problem was I forgot to ECHO out the join. It works now. Thanks anyway!! Jack On 28 Mar 2005, at 15:57, Jackson Linux wrote: Hello all, I am a newbie trying to build a set of links to content in a db. I am connecting with the

[PHP] NEWBIE: Can't Get My Loop Going. . .

2005-03-28 Thread Jackson Linux
Hello all, I am a newbie trying to build a set of links to content in a db. I am connecting with the db and seeing the proper number of rows. if I echo out the values of $id and $sidebar I see that they take on the id# and text of the last entry in the database. I'm trying to make the script ge

Re: [PHP] Newbie Question: breaking a substr() string on a space SOLVED

2005-03-11 Thread Jackson Linux
Hi, everyone, Thanks for the great suggestions! I've looked at all and found that the one here: http://www.php.net/explode that Jay recommended was the easiest for me to wrap my brain around. I wll tinker with the other ones as well - it's all really interesting. The function was: function word

[PHP] Newbie Question: breaking a substr() string on a space

2005-03-11 Thread Jackson Linux
Hi, everyone, I'm 'teasers' of the first, say 200 to 250 characters of some articles. This works great: $content = strip_tags($article['content']); $striptease = substr($content, 0, 275); but cuts off words right in the midd ... I'd like to find a way to take $content, look at the first 2

[PHP] Newbie Question: breaking a substr() string on a space

2005-03-11 Thread Jackson Linux
Hi, everyone, I apologise if this posts twice; I'm having issues with my outgoing email server. I'm making 'teasers' of the first, say 200 to 250 characters of some articles. This works great: $content = strip_tags($article['content']); $striptease = substr($content, 0, 275); but cuts o

Re: [PHP] Re: Question re empty query SOLVED

2005-03-10 Thread Jackson Linux
Hi, Jochem and everyone This: On 10 Mar 2005, at 15:23, Jochem Maas wrote: if (!isset($_GET['r']) || empty($_GET['r']) || !($r = intval($_GET['r']))) { // show a list of R's include('showlist.inc.php'); } else { // process an R include('process.inc.php'); } Solved my issue entirely, as did Jo

Re: [PHP] Re: Question re empty query

2005-03-10 Thread Jackson Linux
On 10 Mar 2005, at 07:38, Jochem Maas wrote: Jackson Linux wrote: Okay, guys, I hope I'm getting closer with your help here but I am still highly confused (that's actually a general blanket statement these days). I've taken your advice and made several changes, On 9 Mar 2005, a

Re: [PHP] Re: Question re empty query

2005-03-09 Thread Jackson Linux
Okay, guys, I hope I'm getting closer with your help here but I am still highly confused (that's actually a general blanket statement these days). I've taken your advice and made several changes, On 9 Mar 2005, at 13:44, Jochem Maas wrote: M. Sokolewicz wrote: Jackson Linux wrot

[PHP] Question re empty query

2005-03-09 Thread Jackson Linux
Hi, This: if (isset($_GET['r']) && !empty($_GET['r']) && ($r = intval($_GET['r'])) ){ $r = "{$_GET['r']}"; //Set the variable $r to mean the category number $fields = '*'; $sort = "ORDER BY cv.sort"; } else { $where = ''; $fields = 'cv.cv_id,cv.category,dates,cv.job_title,cv.company,cv.

Re: [PHP] Re: Newbie Variable Question

2005-03-09 Thread Jackson Linux
I can point to it 4. Fix it so that if someone asks for anything other than an existent ?r=x it kicks back a webpage which just shows links to existing pages. Which brings me to the next question, which I'll post in a second! Thanks again everyone! --Jack On 9 Mar 2005, at 11:43, Jochem

Re: [PHP] Re: Newbie Variable Question

2005-03-09 Thread Jackson Linux
On 9 Mar 2005, at 11:15, Jason Barnett wrote: Jackson Linux wrote: ... asks for cv.'1'.include.php ... And I need it to ask for cv.1.include.php How can I make a variable to fetch the literal number from the field cv.category? Not 100% certain that it will work, but try casting the vari

[PHP] Newbie Variable Question

2005-03-09 Thread Jackson Linux
Hi, All, A php variable question. I've done this to take the requested category from the URL (www.foo.com/file.htm?r=1) and use it to build the page: if (isset($_GET['r']) && !empty($_GET['r'])) { $r = "'{$_GET['r']}'"; //Set the variable $r to mean the category number $fields = '*'; } else { $w

Re: [PHP] Newbie LEFT JOIN question

2005-03-09 Thread Jackson Linux
nks again, Jack On 9 Mar 2005, at 02:19, Rory McKinley wrote: Jackson Linux wrote: Hi, all, I have three tables; 'cv', the main table, 'jobcat', a definition table and 'cvjobcats', an intersection table (for more detail see PS below). I'd like to join this all

[PHP] Newbie LEFT JOIN question

2005-03-08 Thread Jackson Linux
Hi, all, I have three tables; 'cv', the main table, 'jobcat', a definition table and 'cvjobcats', an intersection table (for more detail see PS below). I'd like to join this all together to be able to make a headline consisting of the plain English description of the job category followed by a

[PHP] Re [PHP] Newbie Question re substr: Solved

2005-03-08 Thread Jackson Linux
Sorry if this posts twice. Thanks everyone for the help. The missing comma was the problem with the display; the missing specification of the column at the start of the sql query was the problem with getting the data from the column. Again, thanks all who replied for the fast and excellent hel

Re: [PHP] Newbie Question re substr

2005-03-08 Thread Jackson Linux
On 8 Mar 2005, at 11:40, Richard Lynch wrote: 1. $content = substr($article['content'], 0 200); // get first 200 chars is choking, and I've looked in docs and can't understand why. I get Parse error: parse error, unexpected T_LNUMBER in /usr/www/users/domain/dynamic/templates/substr.htm on

Fwd: [PHP] Newbie Question re substr

2005-03-08 Thread Jackson Linux
Thanks, Kim! Still having difficulties though.. On 8 Mar 2005, at 03:29, Kim Madsen wrote: From: Jackson Linux [mailto:[EMAIL PROTECTED] Sent: 8. marts 2005 04:23 First of all, echo the output to see if You get, what Tou expect in a debug situation: if (!empty($where)) { echo

Re: [PHP] Newbie Question re substr

2005-03-07 Thread Jackson Linux
Reply-To: [EMAIL PROTECTED] On Mon, 7 Mar 2005 22:23:19 -0500, Jackson Linux <[EMAIL PROTECTED]> wrote: Hi, I'm really new and getting lots of help but need some assistance. I'm running a script which gets specific articles from a database if they're entered in the

[PHP] Newbie Question re substr

2005-03-07 Thread Jackson Linux
Hi, I'm really new and getting lots of help but need some assistance. I'm running a script which gets specific articles from a database if they're entered in the URL after the ? . For instance if someone asks for www.foo.com/index.htm?a=1234 then the script would look for an database entry with