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

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 w

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 part

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 lapt

RE: [PHP] Seperating presentation from logic

2002-06-26 Thread David Freeman
> > $siteTitle > > $colBg = "#FF"; > $colText = "#FFCC99"; > $colLink = "#EE"; > $colComplimentary = "#CC6600"; > > > $fontHeading = " size=\"3\">"; Wouldn't you ultimately be better off moving most of this sort of thing into style sheets and then have the designers play w

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 i

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 v

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 no

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 suc

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 WH

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 > > > WHat I want > > >

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 tags. In between these tags there > are sections echoed as a result of a databasse query. Each of these > sections is a form. > > > > > > dynamic content > > > dynamic content >

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 n

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

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 s

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_n

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 tag,

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 brows

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 HTM

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: > > > Port 80 > AddType application/x-httpd-php .php4 .php3 .phtm

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=5&ID=6&ID=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: pag

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

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 sessi

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

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, p

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 / h

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 java

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

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

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 te

RE: [PHP] Defining PHP varibles from URL

2002-05-05 Thread David Freeman
-Original Message- $file = ""; //the above is defined from the url include "$file"; 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 you take change $file

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 includ

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 ac

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- $file = ""; //the

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 wan

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 w

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-06 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 wo

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 a

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 th

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 lowe

RE: [PHP] problems with

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 tags imply a break which adds space vertically. It's contrary to doing good html and will most likely c

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 ac

RE: [PHP] problems with

2002-05-10 Thread David Freeman
> I've only just picked up on this thread, but why not put > each form inside a element? > > i.e. > > > ... > ... > > includes an implied so if you keep it inside your you'll end up with extra space in your cell. If your table has no dif

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 t

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

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 the

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 ev

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 p

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 RA

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 ima

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 t

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? Wh

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 w

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

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 installe

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 c

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 esc

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

RE: [PHP] Classifieds Program

2002-05-18 Thread David Freeman
> I want to add a Classifieds script to my Website. Any recomendation? 1. http://www.google.com/ 2. "classifieds web php mysql" in the search box. 3. Click the "search" button. 4. The 3rd link on the resulting list looks good. 5. http://www.hotscripts.com/PHP/Scripts_and_Programs/Class

RE: [PHP] Why would this command just Die!

2002-05-19 Thread David Freeman
> INSERT INTO prizeline (id, email, name, address, answers, > date) VALUES ('', '[EMAIL PROTECTED]', 'newman', > '12 Newman ave Auckland', 'In Season, James, John', 'Monday > 20th of May 2002 10:22:05 AM')There has been an error If you want 'id' to be assigned by the database (I'm assumi

RE: [PHP] while loop question - problem (new set of eyes needed)

2002-05-19 Thread David Freeman
> while($row = mysql_fetch_array($result)) > { So, your while loop is based on values of $row. > $row = mysql_fetch_array($result); Now within your while loop you've altered the value of $row - poor thing is probably a tad confused. CYA, Dave -- PHP General Mailing List (http:/

RE: [PHP] MySQL and sorting

2002-05-20 Thread David Freeman
> Is there a way to extract lets say a bunch of dates from a > mysql db, and the sort them in order from newest to oldest? > Also how would you sort names in alphabetical order? Yes, and a php list is obviously a good place to ask an sql question. In any case, you want to examine your favo

RE: [PHP] array empty after use

2002-05-21 Thread David Freeman
> When an array is 'used' with something like do while I can't > re-access it later in the page. Arrays have a pointer that steps through the array as you 'use' it. Once you reach the end you'll have to reset that pointer before you can step through the array again. See the manual section on

RE: [PHP] Reverse mySQL date

2002-05-21 Thread David Freeman
-Original Message- How can I reverse the date coming out of mySQL? ie 2002-05-21 becomes 21-05-2002 Can do it in the mySQL query or do I need to use PHP? -Original Message- Have a look at your favourite mysql manual for DATE_FORMAT - this will let you do what you need. CYA,

RE: [PHP] Create table with varying results

2002-05-23 Thread David Freeman
My testing was on a Win box with apache/php and browser was ie5.5 - I haven't uploaded the test code to any of my lamp boxes to check it there but don't believe it would matter if I did. > Here is the source for the page: Before testing your code I did make changes, I'll note them as we go...

RE: [PHP] Create table with varying results

2002-05-23 Thread David Freeman
> I thought maybe I had some problems with formatting > variables in the HTML so I took all the formatting out of > the script so it is really basic now and still have the same > problem. I also thought maybe there were issues with the > data...i.e. with nulls and non-alpha-numeric char

RE: [PHP] Create table with varying results

2002-05-23 Thread David Freeman
> I have a search page that creates a dynamic table of results > from MS SQL Server. The table created on the web page does > not always get created properly for the same recordset. If it was me I'd be doing a "view source" on the displayed page and comparing what it looks like to what y

RE: [PHP] Annoying display problem

2002-05-23 Thread David Freeman
> I want an image (aligned on the left side) with text beside > it (aligned in the center). That sounds simple enough. But try as I may, I > can't get it to work. > * > print " height='120' alt=' '/> align='center'>{$_SESSION['de

RE: [PHP] Annoying display problem

2002-05-23 Thread David Freeman
> Now I've got the text sitting nicely beside the pix, but no > matter what I try (i.e. or whatever, > the text butts right to the left margin, First option is to insert cellpadding or cellspacing in your tag - that's where it get's set for the whole table. A possible solution could incl

RE: [PHP] Function Switch($pid) - NEED HELP

2002-05-25 Thread David Freeman
> I have a script that switches. > switch($pid) > { > case 1: > break; > > case 2: > break; > } > > Now I'm doing a check in case 1 and if everything goes well, > i want to switch directly to case 2 while the script is runny. > > How would i do that ??? In the s

RE: [PHP] Parse Error(Newbie)

2002-05-26 Thread David Freeman
-Original Message- I know it is probably something obvious but the following gives me a parse error and as a newbie I am having trouble locating it. $query = "select * from news WHERE id = "$_get['id']""; -Original Message- Any time you end up with two " characters together is a

RE: [PHP] Validating forms and showing errors

2002-05-26 Thread David Freeman
> I want to validate a form (in page1.php) to check if the > user has entered a correct email-adress and more, and if he > needs to correct some fields, I'd like to display the form > again with all correct values filled in and the incorrect > fields hightlighted. I tend to do this sort

RE: [PHP] Re: Program execution stops at exec()

2002-05-27 Thread David Freeman
> What I don't understand is why my php script dies while > executing the shell script. Set_limit_time should make it > wait. The build.sh script completes well. Not the exact solution here but perhaps a work-around. How dynamic is the data you're generating with your shell script? Perhap

RE: [PHP] Include load question (newbie)

2002-05-27 Thread David Freeman
> I have two files (f1.php,f2.php) that each take about 90% > and 90% of differient functions from the first > file(func.php), would my files (f1.php,f2.php) load faster > if I defined the functions in each file instead of including > it or is this helping? It might, but the difference

RE: [PHP] function return

2002-05-28 Thread David Freeman
> > I have a Q about functions. My function should return 2 > values. What > > syntax should I use and how do I call these values outside the > > function? Are these values returned as en array or something? > I don't know if there is an easier way to do this but why > don't you concate

RE: [PHP] Time release type question

2002-05-29 Thread David Freeman
> This is an example of what I'm talking about. > > Week 1 pages would be visible starting June 3rd > Week 2 pages would be visible starting June 10th > Week 3 pages would be visible starting June 17th Use a database. Store information about each file in the database, including a "relea

RE: [PHP] Relative beginner in dire need of help! (Scratch my last message, sorry... )

2002-05-29 Thread David Freeman
> > Warning: Unable to create > > '../specialoffer_images/specoffpicone.jpg': Permission denied in > > > /home/virtual/loverskey/home/httpd/html/specialoffer_admin/sp > ecial_off > > ers_changed.php on line 45 > > The directories are permissiond correctly, and I've tried so many > Nop

[PHP] Variable Variables

2002-05-29 Thread David Freeman
Hi All, I've been trying to figure this out based on stuff on php.net but can't seem to get a result I need. I have an array: $formarray = array ("form1" => "var1", "form2" => "var2"); And now I'm using that array to create a form (fairly abbreviated): while (list($key, $val) = each($formarra

RE: [PHP] Variable Variables

2002-05-29 Thread David Freeman
> I've got as far as working out that $$key will give me the > equivalent of $form1 but how do I then work out if $form1 > has a value? Never mind, ${$key} was what I was looking for - my test case set the wrong variable and that's why it didn't seem to be working. CYA, Dave -- PHP Gene

RE: [PHP] Variable Variables

2002-05-29 Thread David Freeman
> You may want to code with E_NOTICE errors showing. To > show all levels, use error_reporting: > > error_reporting(E_ALL); Yeah, I already do that... CYA, Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Re: user auth.. with mysql and cookies.. help

2002-05-30 Thread David Freeman
> sorry i'm new be in this... > could you show me where is in my script bellow Did you _READ_ the error messages? > > Warning: Cannot add header information - headers already sent by > > (output started at ../functions.inc:54) in > ../functions.inc on line 49 On or about line 49 of func

RE: [PHP] New to PHP- Form Validation Logic/Design Question

2002-06-01 Thread David Freeman
> I included a pseudocode form of my logic here & my actual code below. A suggestion in similar pseudo code. "top of page" "set a flag to display form" If (form submitted) { "validate entered data" if (data is correctly validated) { "enter data into database" if (databas

RE: [PHP] Nathan->Re: [PHP] Julie-> A small question - Mysql_insert_id

2002-06-01 Thread David Freeman
> Yeah, I seem to have a talent for pissing people of > unintentally, and Julie seemed to have gotten more than a > little pissed at me. Anyway, the reason I didnt specify the Perhaps the problem is that you're asking a question that you could solve yourself. You asked about mysql_insert_

RE: [PHP] Sessions

2002-06-02 Thread David Freeman
> Has anybody here used an online turoral that they feel is > good for a newbie or has done wonders in helping you on when > you were learning php? if so please send me the website name / URL. http://www.devshed.com/Server_Side/PHP/UserAuth/page1.html I found this one quite good - not so m

RE: [PHP] 'Pure' php vs 'mixed' (html + php)

2002-06-02 Thread David Freeman
> I've noticed that many people on the list code in 'pure' php, i.e. > > print ""; > > // etc > ?> Personally, it depends on what I'm doing. I find that excessive use of in my code gets distracting so if I need a lot of php code I will usually put the straight html into echo/print str

<    1   2   3   >