RE: [PHP] Passing variable to the next page

2002-06-04 Thread David Freeman
Here is scenario that I am working on but have a problem. I have 10 thumbnail images on the page with information for them created from database. (I am pulling more info about that image from database, but on this page I only display Name of Image and Author of image, the

RE: [PHP] [PLEASE HELP] Passing variable to new page.

2002-06-06 Thread David Freeman
echo script language=\JavaScript\; echo function pop1() {; echo window.open(\info.php?prod_id=$result[0]\); }; echo /script; I am calling this function in the following manner: echoimg onclick=\pop1();\; OK, I tend not to put javascript inside php echo statements as it confuses

RE: [PHP] Thumbnail pages - alot of them

2002-06-07 Thread David Freeman
I have a mysql database table of about 7000 images (they are not actually in the db, just references), as yet uncategorized. I need to put them online and allow my client to browse 12-18 thumbnails per page. what would be the most efficient method to code that with PHP? any

RE: [PHP] convertion from string to time substracting

2002-06-07 Thread David Freeman
I got a mysql database, where two of the fields of a table record times as CHAR(8) in the format hh:mm:ss This is one of those situations where having your database using the most appropriate field types would help. When you've got it as CHAR there's little you can do in the way of

RE: [PHP] majordomo in php?

2002-06-07 Thread David Freeman
Anyone knows of a majordomo type mailing list made with php Why would you want to do that? If you need mailing list software you'd be infinitely better off using one that already exists - if you need features that it doesn't support (eg. A web front-end for majordomo)

RE: [PHP] strip_tags bug ?

2002-06-07 Thread David Freeman
The minor problem is that it treats a not-equals sign, , as an empty tag and strips it, unless it's explicitely ...etc... Except, of course, that when writing html you are supposed to use entities for any valid html stuff - ie. Use gt; and $lt; for and so on. As you should also use

RE: [PHP] dynamic pull-down menus?

2002-06-07 Thread David Freeman
That sounds very close to what I'm trying to do. Is it necessary to reload the page every time a selection is made? I've found examples of the javascript side of it on www.irt.org that helped last time I did this sort of thing. The php/sql stuff is a matter of figuring out what you need

RE: [PHP] e-commerce example

2002-06-08 Thread David Freeman
I'm looking for e-commerce example (PHP+MySQL) so I don't start from zero and save some time. You could try searching for php mysql commerce on any of the following: www.google.com www.freshmeat.net www.hotscripts.com Where you'd probably find what you're looking for. CYA, Dave --

RE: [PHP] Re: Date?

2002-06-09 Thread David Freeman
Speaking of which. I was thinking about this this morning. Is there a part of the Unix timestamp that tells php what timezone to report. You could use the gmt-based date manipulation to do this. Reason why I ask, is I would like to offset the unix timestamp relative to where

RE: [PHP] Calendars

2002-06-10 Thread David Freeman
I am trying to feature a calendar on a web site. I would like it to display on a page and be able to change to another month when this is requested and display items for the general public. I want the client to be able to go into the database and update the items and those items to

RE: [PHP] the curse of the period

2002-06-11 Thread David Freeman
The directory and file name: museum/trees/admin/upload2.php The directory I want to store the uploaded file is: museum/landmark/photos/ I've found that if you need more control over directory paths than something fairly simple then you're often best off just declaring a set

RE: [PHP] GOTO command. Doest it exist?

2002-06-11 Thread David Freeman
I do beg your pardon... But does PHP not have GOTO command? Why do you need one? In my experience, going right back to BASIC over 10 years ago, it's rarely _necessary_ to have a goto. In php I suspect you'd get similar functionlity out of either include() for creating functions. Not using

RE: [PHP] Include question

2002-06-11 Thread David Freeman
somefile.php ? $apple = 'green'; $pear = 'yellow'; ? callfile.php ? include 'somefile.php'; echo Apples are $apple and Pears are $pear; \\ which would return the line with green and yellow in the correct spots. ? But when I just do ? include

RE: [PHP] Else/For loop

2002-06-12 Thread David Freeman
Being relatively new to php, I discovered the following after about 2 hours of debugging last night and was wondering why??? I had the following code: if ( $num_results = 0 ) { echo no records found; } else { for ($i=0; $i $num_results; $i++) {

RE: [PHP] Querying for MAX

2002-06-12 Thread David Freeman
What I’m trying to do here is not inside PHP nor MySQL books I have. I need to query the DB to look the max result in a column. That is, if I have affiliate members with ID going from 1 to 10, get the query to know that the last member added was 10 so I can add member 11 without

RE: [PHP] Extracting from an Array

2002-06-12 Thread David Freeman
I have a db field, type varchar, that is actually a 'date' string formatted as dd-mm-. I used type 'varchar' (rather than type 'date') since I had to accomplish other things with it. Now, however, I do need to extract the Year (the last four digits in the array). Ummm, are you

RE: [PHP] possible to add a record number to a query?

2002-06-13 Thread David Freeman
I would like to have a column returned in a query that tells you which record I'm looking at? Sort of like an auto_increment? IOW, the query results would look like: record first last 1 johndoe 2 joe blow 3 carol fisher The table

RE: [PHP] truncating dilema

2002-06-13 Thread David Freeman
It has just occured to me though that if I'm to list maybe 100 news items with descriptions it means alot of memory right because i have 100 items containing: date title text (could be any length) I will use substr()

RE: [PHP] confused newbie on PHP and Javascript.

2002-06-13 Thread David Freeman
I have a JavaScript function that onChange of a list box, takes the value of an option and grabs data from a MySQL table. My problem is how do I use the JavaScript var in my sql statement? Javascript is client-side, php is server-side. The only way to get something that happens in

RE: [PHP] string to array?

2002-06-13 Thread David Freeman
I have a string something like 10.2.3 I want to be able to use the . as a delimiter to reference the elements (10, 2, and 3). My thought was to create an array, using . as the delimiter. Is there a function that will create an array out of a string, using a delimiter you specify?

RE: [PHP] Extracting Variables

2002-06-13 Thread David Freeman
echo i = $ibr; for($c=1;$c=$i;$c++){ echo team_number $team_number_$cbr; echo sub1_$c = $sub1_$cbr; echo sub2_$c = $sub2_$cbr; echo sub3_$c = $sub3_$cbr; echo sub4_$c = $sub4_$cbr; echo sub5_$c = $sub5_$cbr; } } Perhaps this: Echo sub1_$c

RE: [PHP] mysql_num_rows always returns 1?

2002-06-18 Thread David Freeman
$query = select count(*) from users where You are asking for a count() in your query. This will always give you one row returned with a count. If you really want to do this you should probably have: $query = select count(*) as usercount from users where Then you can do your tests

RE: [PHP] insert date with a calendar

2002-06-20 Thread David Freeman
user input, which is not always reliable, has to be in the correct format. What I've done for things like this is to have three separate select form elements. The first for selecting a day of the month. The second for selecting a month and the third for selecting a year. I usually set the

RE: [PHP] include() question...

2002-06-20 Thread David Freeman
Okay, let's say I want to send a user to a certain webpage... usually I would use... include(website.php); but, if i want to send a user to a website along with a variable like... $temp = website.php?var=.$var; include($temp); ...this doesn't work. If you are

RE: [PHP] Stumped on a function

2002-06-21 Thread David Freeman
function cleandate($indate) { str_replace(-, /, $indate); return date(F j, Y, strtotime($indate)); } I suspect that you actually need something like this: function cleandate($indate) { $indate = str_replace(-, /, $indate); return date(F j, Y, strtotime($indate)); }

RE: [PHP] checkboxes

2002-06-22 Thread David Freeman
I know this might be a bit easy for all you experts out there. I have multiple checkboxes and text areas in a form. In the confirmation email sent to the user I manage to get the text areas to display in the email. How would I get the results of the checkboxes to to display as

RE: [PHP] php JavaScript

2002-06-24 Thread David Freeman
I've tried to include a simple javascript in a .php file, but couldn't get it to work. Actually not even the php code worked at all... Is there any specific configuration flag that needs to be set up in the Apache server so that the javascripts work correctly? Not

RE: [PHP] Testing PHP on a local machine

2002-06-24 Thread David Freeman
I want to set up a site at home to play with php I have windows xp pro, dreamweaver MX and mysql Do I need anything to view live application data locally in my browser You'll need to install a web server that supports php and php itself. I did this recently on my XP Pro laptop

RE: [PHP] Seperating presentation from logic

2002-06-26 Thread David Freeman
? // general_config.php $siteTitle $colBg = #FF; $colText = #FFCC99; $colLink = #EE; $colComplimentary = #CC6600; $fontHeading = FONT class=\heading\ face=\verdana, arial\ size=\3\; Wouldn't you ultimately be better off moving most of this sort of thing into

RE: [PHP] PHP not working on Apache at XP Pro.

2002-06-26 Thread David Freeman
I've got Windows XP Pro OS. I installed and am running mySQL on that. However, PHP is not getting configured with Apache on it. I got the latest Apache, 1.3.24 or something, not the Version 2. Anyway, Apache runs perfectly on it. However, when i put in the required PHP lines in

RE: [PHP] Seperating presentation from logic

2002-06-26 Thread David Freeman
Wouldn't you ultimately be better off moving most of this sort of thing into style sheets and then have the designers play with the style sheets instead? What if your designer wants to change from a two column table to a four column table. Or change the menu from a vertical

RE: [PHP] Javascript to PHP?

2002-06-29 Thread David Freeman
My apologies if this has been asked a thousand times. I've just joined the list. I has, but you get that... I can't find any information on passing JavaScript variables to PHP on the same page (i.e. not through the POST information of a submitted form). Is this because it's not

RE: [PHP] include files or fopen

2002-06-30 Thread David Freeman
I am trying to write a program that is very modular in nature one of the features I need the user to be able to do is install/uninstall or enable/disable the module though the interface. I have, in the past, stored such information in a database. In projects that have need of such

RE: [PHP] mySQL time = year 2038 [SOLVED]

2002-07-01 Thread David Freeman
Yep, I was using the DATE() function in PHP to convert a TIMESTAMP from a MySQL DB query. I was getting a year of 2038 because MySQL and PHP use different TIMESTAMP formats. $getmyTime = mysql_query(SELECT UNIX_TIMESTAMP(timestamp_col) AS yournamehere FROM myDBnamehere WHERE

RE: [PHP] FW: Help please!

2002-07-02 Thread David Freeman
id 3 from the database. What I really want is to state width is 100 and height is 100 for example so I do not have to downlaod the entire picture and specify the width and height as part of the image: Do not want img src=getdata.php?id=3 width=100 height=100

RE: [PHP] Button can't see form!

2002-07-05 Thread David Freeman
The problem I have is with a page I build dynamically. The whole page is encased in form/form tags. In between these tags there are sections echoed as a result of a databasse query. Each of these sections is a form. form name=addproduct table !-- loop round result set

RE: [PHP] Best String to Array Solution

2002-07-11 Thread David Freeman
Greetings, this may be simple, but it's late and my brain needs a hand. I have a string such as first,second,third,fourth I need a way to take each one of the items separated by the comma to be an item in an array. Check out explode() and I think you'll find what you need.

RE: [PHP] PHP/MySQL -- Date/Time Confusion

2002-07-12 Thread David Freeman
Which method is the best way to store date/time in MySQL and then which PHP command is the best to use to convert that date to something useful? Get comfortable with MySQL's date functionality and you'll find that you don't often need to do the date comparisons and manipulation in php

RE: [PHP] mysql LIMIT

2002-07-14 Thread David Freeman
can I use limit to show the 2nd record on without knowing how many more records there might be? also, what happens if I set the limit in a mysql statement (LIMIT 5,10), but there are only 3 results? 7 results? My answer would tend to be that you should try it for yourself and

RE: [PHP] retrieving random data from mysql database

2002-07-14 Thread David Freeman
can you teach me how to retrieve random data from my database? like for example...i have a list of names on my database and i'd like to retrieve only one name at a time..randomly. how do i go about this? This is really a database question rather than a php question and you haven't

RE: [PHP] retrieving random data from mysql database

2002-07-15 Thread David Freeman
When you say, Order by RAND() I would think the Order by construct expects a column name. In your case, it gets a decimal value. How does Order by treat decimal values? Oh, I just checked the manual: In MySQL Version 3.23, you can, however, do: SELECT * FROM table_name ORDER

RE: [PHP] Inclusion error

2002-07-16 Thread David Freeman
Failed opening '/var/www/html/BOOKS/newbooks.php' for inclusion (include_path='.:/php/includes:/usr/share/php') in Unknown on line 0 I am getting the following error, when the file newbooks.php is invoked. The first lines in this entire file starts with the ?php tag,

RE: [PHP] redirecting after login

2002-07-23 Thread David Freeman
what doesn't work is after they login to Page 1, the redirect sends them to Page 2 and right back to Page 1 because the global session isn't staying registered. Are you putting session_start() at the top of each page where you want to be able to use the session stuff you've set?

RE: [PHP] datetime field - still a newbie

2002-07-24 Thread David Freeman
I have a datetime field in one of my mysql tables...when displaying some of my records I want to display the date in the aforementioned datetime field, but if the date is today I want to display today instead. If the date is yesterday I want it to display that so I how do I

RE: [PHP] Paying Job...

2002-07-25 Thread David Freeman
Do you charge by the page, script or by the hour (that would be nice). We do this sort of thing in, basically, one of three ways... 1. Client gives us a budget and we give them a clear idea of what that budget will get them. 2. Client gives us a good idea of what they want to achieve

Re: [PHP] date problem

2002-04-28 Thread David Freeman
On 28 Apr 2002 at 14:48, Nick Wilson wrote: I have a field in MySQL db like this: date TIMESTAMP, and it looks pretty regular like this: 20020428011911 If you've got the data in your database then do the date/time conversions as part of your sql query - it's more efficient. Something like

Re: [PHP] Weird/inconsistent behaviour when sending an empty file? (WAMP, Apache2, PHP 4.2.0)

2002-04-28 Thread David Freeman
On 28 Apr 2002 at 17:54, Moritz Schallaboeck wrote: it might very well be an ignorant oversight, but I can't explain the following behaviour. Consider a file containing -only- this code: -snip- ? ? -snip- [etc] Just a personal opinion here... if you're sending output to a browser

Re: [PHP] failed query results

2002-04-28 Thread David Freeman
On 28 Apr 2002 at 13:48, baldey_uk wrote: $customer_id_check=(SELECT id FROM $customer_table WHERE firstname = '$firstname' lastname = '$lastname' email = '$email'); $result1=mysql_query($customer_id_check); if (!$result1) {

Re: [PHP] Auto refresh when data changed in Mysql

2002-04-28 Thread David Freeman
On 28 Apr 2002 at 20:32, Simonk wrote: I have added the code, but it turn out : Warning: Cannot add header information - headers already sent by (output started at C:\Inetpub\php\hospital_equipment.php:5) in C:\Inetpub\php\hospital_equipment.php on line 6 [etc] Here is my full HTML

RE: [PHP] Re: NameVirtualHost breaks PHP

2002-04-28 Thread David Freeman
On 28 Apr 2002 at 16:11, Greg Blakely wrote: Can you indicate Apache settings regarding php and virtualhosts? In the main server configuration area, I have: [etc] ### and then, under the VirtualHost area, I have: VirtualHost * Port 80 AddType application/x-httpd-php .php4 .php3

Re: [PHP] GET question

2002-04-28 Thread David Freeman
On 28 Apr 2002 at 23:30, Evan wrote: I pass parameters via querystring in this way: page.php?ID=5ID=6ID=23 In $_GET[ID] I get only the value 23 Unless you set ID as an array, which you haven't, you'll only keep the last value. The simple answer is to have something like:

Re: [PHP] Supplied argument is not a valid MySQL result resource

2002-04-28 Thread David Freeman
On 28 Apr 2002 at 15:14, Dan McCullough wrote: What does that error mean? $result = mysql_query('select * from aannh_towns;'); echo 'info stored'; while ($query_data = mysql_fetch_array($result)) { echo , $query_data['town'], , $query_data['town_id'], ; } ? Means you stuffed up

Re: [PHP] redirection

2002-04-28 Thread David Freeman
On 28 Apr 2002 at 19:11, Norman Zhang wrote: I want to set up a check that the page cannot be exacted by calling from another page. E.g., members.php can only be excited if it called by login.php. If your login page does some sort of authentication and then either sets a cookie or a session

Re: [PHP] append line to text file HELP !!!

2002-04-28 Thread David Freeman
On 29 Apr 2002 at 0:26, Rodrigo wrote: Ok guys, this is the code and under it you can see what I get when I try to submit the form. ?php $file_pointer=file('emails.txt','a') || exit; $string_to_write = ($newmail).\n; $s=fopen($file_pointer,$string_to_write); $s=fclose($fp); ?

Re: [PHP] lookin for a Menuing System...

2002-04-28 Thread David Freeman
On 29 Apr 2002 at 15:11, Dan wrote: what I need is a menuing system.. Much like this JavaScript one... except I need it in PHP... http://www.dynamicdrive.com/dynamicindex1/navigate1.htm Umm, you want to have to reload a whole page just to expand a navigation menu? Not real good use of

RE: [PHP] lookin for a Menuing System...

2002-04-28 Thread David Freeman
On 29 Apr 2002 at 14:05, Martin Towell wrote: javascript should be easy enough to convert to php - thier language constructs are basically the same. Sure, but that doesn't mean it's appropriate. A menu system done in php will have the advantage of being, from the browsers point of view,

Re: [PHP] lookin for a Menuing System...

2002-04-28 Thread David Freeman
On 28 Apr 2002 at 23:03, Miguel Cruz wrote: Do it in JavaScript, it works and it's client side so it will be faster. But take care - using JavaScript for site navigation is tricky business. Some people don't use it, some people can't use it (not supported by their browsers / hardware

Re: [PHP] lookin for a Menuing System...

2002-04-28 Thread David Freeman
On 29 Apr 2002 at 0:46, michael kimsal wrote: Can someone point me to hardware that is still in active use that can't handle javascript? Hardware? No. Similarly, can someone point me to a company that specifically disables javascript as 'corporate policy'? Back in 96-97, the 'no

Re: [PHP] parsing mail files

2002-04-29 Thread David Freeman
On 29 Apr 2002 at 8:24, Michael George wrote: I am looking for some sample code that will parse a file in Unix mbox format. How much control do you have over the system the mbox lives on? You might find it easier to do at least some of the pre-processing as a shell script before feeding it

Re: [PHP] MS SQL problem

2002-04-29 Thread David Freeman
On 29 Apr 2002 at 14:14, Joshua E Minnie wrote: if(user_exists($dbname,users,user,$user) 0) { echo the variables to make sure they are what they should be. function user_exists($dbname, $table, $field, $value) { echo the variables to make sure they are what they should be. $query =

Re: [PHP] Cannot add header information

2002-04-29 Thread David Freeman
On 29 Apr 2002 at 13:02, Bo Pritchard wrote: G'day Bo I know without the accompanying code there's no way to help me...But without having to get real specific what does the following message tell me is wrong? Warning: Cannot add header information - headers already sent by (output started

Re: [PHP] create textfile if not existing?

2002-04-29 Thread David Freeman
On 29 Apr 2002 at 22:49, Hawk wrote: lets say I have 30 lines of text and I want to store it in a folder called txt with the filename $name.txt and, if $name.txt exists, create a $name1.txt or similiar? What is it that you are trying to achieve? It sounds like you're trying to store

RE: [PHP] Defining PHP varibles from URL

2002-05-05 Thread David Freeman
-Original Message- script language=php $file = ; //the above is defined from the url include $file; /script It could be what I was typing in the url bar. file.php?file=foobar.inc -Original Message- Hmm, so you define $file in your url as foobar.inc and then, in the page itself

RE: [PHP] Who's having a good hosting experience these days?

2002-05-05 Thread David Freeman
My hosting service which WAS cool about 2 years ago has grown into a bloated mess of zero logic. Fast, Reliable, Cheap, Feature-Rich Now pick any three. In the end I guess you get what you pay for. If you can only afford a lower price host then you only get lower value. CYA, Dave --

RE: Re[2]: [PHP] HTML to mysql - from msql to html

2002-05-05 Thread David Freeman
now i am having problems with spaces text is: --- bla bla bla foo --- and shows: --- bla bla bla foo --- Plain old HTML ignores white space. You do understand this? To include what you

RE: [PHP] Please, can you help me?

2002-05-05 Thread David Freeman
I have a big problem and cannot find the answer anywhere, so please, help me if you can. When I use fwrite() function on webserver, it sometimes happens, that more then one user accesses the file and the result is, that the file is corrupted or truncated. I suspect that flock()

RE: [PHP] Tailing a log file {!?}

2002-05-05 Thread David Freeman
Is there a tail util for NT/W2K? Almost certainly there will be a tool that will read the end of files. The problem will be in what you want to look at. If you want to look at log files on NT/2K then, AFAIK, they aren't actually vanilla text files so a tail util won't do the job. I'm not

RE: [PHP] Defining PHP varibles from URL

2002-05-06 Thread David Freeman
-Original Message- I don't mean to be a pain but could someone send me a working example? -Original Message- This was replied to already by me and others. Didn't you read the replies? In any event, here's what I wrote last time... -Original Message- script

RE: [PHP] Formatting Information in header? Gridlines in Excel

2002-05-06 Thread David Freeman
-Original Message- Can someone tell me where to find the various options for the Header function as it relates to M$ Excel? -Original Message- As far as I know, you can't. Headers are for html/http information not for any particular helper application. If you want to

RE: [PHP] Sorting, sort of

2002-05-06 Thread David Freeman
-Original Message- I have about 50 records with the following fields: 'gen', 'year', 'color', 'name', 'email', 'location', 'misc', 'pic1', 'pi c2', 'pic3', 'pic4' -Original Message- If you're going to be changing your database, you might also consider what to do with

RE: [PHP] File upload problem

2002-05-06 Thread David Freeman
-Original Message- D'oh! You're right, I went back and checked php.ini and found upload_max_filesize but it's already set to 200M, I'm assuming that means 200 MegaBytes. So I don't think that's the problem. I don't have the hidden tag set in the page code so that

RE: [PHP] Redirect after submit

2002-05-06 Thread David Freeman
-Original Message- I have a page that contains multi If ElseIf statements. I want to redirect right after a user submits gets a message (echo Entry Added to Database. \n; ) would you like to add another. then prompts for an alert. Would you like another ??? and

RE: [PHP] File upload problem

2002-05-07 Thread David Freeman
-Original Message- I'm curious, I keep seeing people say that that tag is /necessary/, but I've never had to use it in the upload forms that I've built and they work just fine in Opera, NN IE. Good question. To be honest it's been a while since I looked, I built a file

RE: [PHP] Error messages

2002-05-07 Thread David Freeman
really nice error message. I put it below. Is this a PHP function/mode/config option or where these things written by the people who maintain PHP on that site? MySQL Error : Connection Error Error Number: 1045 Access denied for user: 'icon@localhost' [etc] A little of both I would

RE: [PHP] Self Destruct code

2002-05-07 Thread David Freeman
basically I will be left at their mercy; if they don't pay, So, is there any way I can inconspicuously code in some boo-boo's that are time related etc. I'd suggest that you have a legal or business practices issue rather than a technical one. Do you have a signed contract or work

RE: [PHP] File upload problem

2002-05-07 Thread David Freeman
-Original Message- Hmm, after a bit of testing I find that the MAX_FILE_SIZE tag is useless to say the least (probably because no browsers support it?) That's somewhat of a shame I guess but I can hardly claim to be surprised - especially as I've just spent much of my time in the

RE: [PHP] Genus who came up with Self Destruct Code Copy Pro tection

2002-05-09 Thread David Freeman
I was talking in general. The BBS was simply an example to make things clearer. I am *not* developing a BB system! If you want you can think of a immaginary tool that makes a website load twice as fast, need the half web space and makes the website look nicer, of course at lower

RE: [PHP] problems with form/form

2002-05-09 Thread David Freeman
a table with several contents, and I have a form on every row, the problem is that the form is to big, so the tab le looks ugly, I tried with everything I could come up with, The form/form tags imply a break which adds space vertically. It's contrary to doing good html and will most

RE: [PHP] Genus who came up with Self Destruct Code Copy Pro tection

2002-05-09 Thread David Freeman
Obviously most coders are in the middle ground. They are not writing the killer app of all time but is of significant value. I don't know what people on here are charging but I can't add $2880 a year to my overhead for the zend encoder. Plus add $1875 per cpu for the zend

RE: [PHP] problems with form/form

2002-05-10 Thread David Freeman
I've only just picked up on this thread, but why not put each form inside a td element? i.e. table tr tdform ... /form/td tdform ... /form/td /tr /table A closing /form includes an implied p so if you keep it inside your td/td you'll end

RE: [PHP] Genus who came up with Self Destruct Code Copy Pro tection

2002-05-10 Thread David Freeman
So I should buy a commerical product from zend to protect my code but since my code will be reversed engineered anyways then what's the point of buying from zend? That's your choice. It's also my point. If you can't be 100% secure then perhaps you should be looking at what you're

RE: [PHP] Layout Help

2002-05-10 Thread David Freeman
Anyway, I have a stack of 76 playlists I need to consolidate and display. These are from radio shows, so each playlist has the date, the name of the radio show, and anywhere from 20 - 27 tracks, artists, and albums on them. It's really more an sql question than a php question but...

RE: [PHP] Alternating table rows...

2002-05-10 Thread David Freeman
I've been asked if I can alternate the colors of the rows to make the report more legible. What I usually do is something like this: if ($colour == blue) $colour = red else $colour = blue; Then the bit where you actually output display you use $colour to set display attributes and away

RE: [PHP] randomize?

2002-05-10 Thread David Freeman
I have a group table with 16 items, and I want them to be randomly put in 4 different groups, with 4 in each group, I've seen the $rand(x,x) thing, but is there any way to limit to 4 in each group without 47839 rows of code? :P Wouldn't you just randomise all 16 items and take them

RE: [PHP] Best way for date/time

2002-05-11 Thread David Freeman
Okay so I've then got 2002-05-08 and whats then the best way to manipulate it regarding plus 3 days or plus 4 weeks ? Do it in your sql query - check out the date manipulation stuff in the sql manual - it's quite comprehensive and tells you what you need to know. CYA, Dave --

RE: [PHP] MySQL and RH 7.2

2002-05-11 Thread David Freeman
I tried locate and find and both come up empty for mysqladmin. Am I missing something stupid here? How did you install it? Did you build from source or use rpm's? If you installed from rpm's which ones did you install? From memory there's about four rpm's that you'll need to have

RE: [PHP] random order

2002-05-12 Thread David Freeman
hmm it got a little more complicated now, i have a table with: id title question answer1 answer2 answer3 answer4. how can i use all of those in a php page but only randomize the answers? You have multiple questions with the same answers? Then split your table into two tables and put

RE: [PHP] random order

2002-05-12 Thread David Freeman
I have a mysql databse with 4 rows, and each row (row1, row2, row3, and row4) contains a sentence. now i want these sentences to appear in random order: I've always found mysql's RAND() function to be of use. Specifically: SELECT * FROM MyTable WHERE Some='Condition' ORDER BY

RE: [PHP] Generate inline image

2002-05-12 Thread David Freeman
How do I generate gif inline images using PHP's image functions using GD libs. Everything I have seen so far requires a header before generating the image. But I want the image embedded into a table with other texts. Thank you for the help. Write the php to generate the image

RE: [PHP] template logic problem

2002-05-13 Thread David Freeman
My problem is that for one page in the site I need to display a image in the navigation bar that is referenced from a database. The database query happens in the included file which is below the navigation in the html - This means i cant reference the image file name because the

RE: [PHP] PHP file Opening Problem

2002-05-13 Thread David Freeman
Whenever I try to open any PHP page on my browser i.e. IE then it displays Windows message box for saving the file on the disk or opening the code in any editor. I mean PHP file is not executed successfully and I am unable to figure out the problem. What is the web server? What

RE: [PHP] Newbie challenge to brainiacs

2002-05-14 Thread David Freeman
Here is a sample of my weblog that reads into an array from a file ie I want to try to find the hour that has the most hits The day of the week that has the most hits and the max and ave no of hits of these. I haven't given it a whole lot of thought but I'd be tempted to dump the

RE: [PHP] Where's the error?

2002-05-14 Thread David Freeman
Thanks heaps for your help I really appreciate it. I have made the changes you suggested but now I only get a blank screen. These are more general hints on ways to solve the problem yourself. function getmydate($hit) { $single = explode ( ,$hit); return $single[3].$single[4];

RE: [PHP] Sessions Without Cookies or SID Passing...

2002-05-14 Thread David Freeman
You're missing one method - using the user's IP address It's not a guaranteed fool-proof method, but if you don't want to use cookies or the URL, then this sorta works. Unless there's a firewall using NAT or a proxy cache involved. I know for a fact that our internal network only ever

RE: [PHP] Cool PHP Tricks/Features ?

2002-05-15 Thread David Freeman
It's quite some time since I dealt directly with modems and packets moving over networks per se so some of this may well prove wrong - feel free to point it out if I am someone. 3. But surely, ASDL, cable, the backbone and decent intranets must all do hardware compression, don't they? Or

RE: [PHP] Date and time functions

2002-05-16 Thread David Freeman
I am on the East Coast of Australia. I'm in central Queensland... Do you know if by default if the date/time display will display only East coast Australia time, or will display from the user's time zone? eg Will USA users see the Australian time or their own time? Would this

RE: [PHP] Q:Anybody using PHP directly on Mac-OSX???

2002-05-17 Thread David Freeman
So, anybody out there have PHP installed on their local home desktop Mac OSX box able to test by a quick preview in browser from say an app like BBedit? I went to: http://www.google.com/ I entered the following into their dinky little search box: mac osx apache mysql php installer I

RE: [PHP] Confused about which function to use with forms/database

2002-05-17 Thread David Freeman
I've read the documentation but am still confused about what to use when. When passing data from forms to database, which do I use? When retrieving data from database to display in forms, which do I use? Kinda depends on what you're using the data for really. If you don't care

RE: [PHP] Confused about which function to use with forms/database

2002-05-17 Thread David Freeman
When you suck the data back out you'll obviously need to stripslashes() to get rid of the 'escape' chars you added above. Nope, because the escape characters don't actually get added to the database. When the database's command interpreter sees it, it removes the escape

RE: [PHP] random order by id

2002-05-18 Thread David Freeman
i have a db and a table with id and questions now i want these questions to be listed in a random order, is there a way to format my SQL query or do i need some PHP work to? It's best achieved in sql: SELECT ID, Question FROM Questions WHERE Some = Condition ORDER BY RAND() LIMIT 10

  1   2   3   >