Re: [PHP] Problem about Reading input from a Form

2002-02-25 Thread Stewart G.
Its not a register_globals issue. You must wrap $user and $address in php print statements rather than just in the html. Your name is . Your address is . That will work with either GET or POST. -- Stewart On Mon, 25 Feb 2002, Kostas Karadamoglou wrote: > I set the register_globals On in the

Re: [PHP] Re: form submission error trapping

2002-02-25 Thread Stewart G.
You do not need to use javascript. Simple create a form that submits to itself. And check the values, then reprint the form or redirect. Example: \n"; } } if (!empty($err_msg)) print $err_msg; } ?> Hope that helps, -- Stewart On Mon, 18 Feb 2002, George Whiffen wrote: > Jason

Re: [PHP] Problem about Reading input from a Form

2002-02-25 Thread Stewart G.
OK, Im an idiot, glad I caught myself before someone else did. I didnt see the PHP print statments. :) Follow mikes advice on the register globals, and restarting the server. Or try using $HTTP_POST_VARS['user'] or $_POST['user']. -- Stewart On Mon, 25 Feb 2002, Stewart

Re: [PHP] PHP Forms

2002-02-25 Thread Stewart G.
Your submit button does not have name="submit" set. So $submit is never being set. Also your html is full of errors, I would clean that up and put it thru a validator, try html tidy (www.w3c.org). And, make sure that formvalidation() is passing true, is that fails the form will never be submi

Re: [PHP] when to use htmlspecialchars()

2002-02-25 Thread Stewart G.
If you will be using the data elsewhere then use it when it is displayed on the screen, or your other program will have to parse it. It is a good idea to always run htmlspecialchars when outputting text to the browser that came from a form. -- Stewart On Mon, 25 Feb 2002, Erik Price wrote: >

Re: [PHP] Converting arrays

2002-02-26 Thread Stewart G.
Why dont you just use timezones? =S. On Mon, 25 Feb 2002, Gary wrote: > Simon Willison wrote: > > > Gary wrote: > > > >> Hi All, > >> I am not too bad at building arrays in php but I need to convert a > >> javascript form into php. How wuld I conver the small snippit here? > >> > >> var d =

Re: [PHP] PHP features

2002-02-26 Thread Stewart G.
If you are talking about the session variables use --enable-trans-sid, if you are talking about variables passed from your form fields to another script use on in your html. =S. On Tue, 26 Feb 2002, Daniel Alsén wrote: > Hi! > > Which function should i turn on in the PHP installation to get

Re: [PHP] dynamic pulldown list generation help

2002-02-26 Thread Stewart G.
I got this to work, it list all file (type f) in the current directory, you can extend it further. $ls = split("\n", rtrim (`ls`)); print ""; while (list ($key, $value) = each ($ls)) { if (is_file ($value)) print "$value\n"; } print ""; =S. On Tue, 26 Feb 2002, Andrew Slezak wrote: > Basic

Re: [PHP] is there an "in" qualifier in PHP?

2002-02-26 Thread Stewart G.
if ($row['id'] in_array ($selected_users)) { // execute } =S. On Tue, 26 Feb 2002, Erik Price wrote: > I have a problem with some code (posted below), which I think I can > solve using a method similar to that found in Python: > > if ($item in $potential_items) { > // do one thing > } e

Re: [PHP] getting the URL of a parent frame

2002-02-26 Thread Stewart G.
This is the wrong list to bring up such an issue. However you can use: parentWinLocation = window.parent.location.href; In the future please keep messages to this list relevant to PHP. =S. On Fri, 25 Jan 2002, Unger wrote: > Hello! > > How can i get the url of the main page with a script,

RE: [PHP] mysql php - while loops

2002-02-27 Thread Stewart G.
After the loop has finished executing add another line if ($i % $cols != $cols-1) { print ""; } Otherwise once the loop has finished if not EXACLTY $i % $cols == $cols-1 then there would be no after the last row which could cause display problems in the user agent (other than the fact that it

Re: [PHP] Unable to display images on browser

2002-02-27 Thread Stewart G.
try using gd if you have >= 1.8.3 then you will have to use ImagePng() and Content-type: image/png instead of ImageGif() to export the image. header ("Content-type: image/gif"); $im = ImageCreateFromString ($fileContent); ImageGif ($im); =S. On Tue, 26 Feb 2002, Narvaez, Teresa wrote: > Hello

RE: [PHP] Crontab

2002-02-27 Thread Stewart G.
This is why I love lists. I was going to have to do something similar this week and was planning on using perl, never thought about running php from the command line. Thanks, =S. On Wed, 27 Feb 2002, Sven Jacobs wrote: > I've use a script that I put in my cron.weekly to execute a php script