Re[2]: [PHP] Self Submitting Form

2004-02-21 Thread Toby Irmer
Hi Sam, I did that only because I was too lazy to upload and did the testing locally so I could grab the value in Javascript. Of course it works with post as well... test.html form name=myform1 method=get action= input type=hidden name=myvar1 value=testing script

[PHP] CMS and images, how?

2004-02-20 Thread Toby Irmer
Hi there, I am presently coding a little CMS. I want to give users the possibility to add images to articles as easily and flexibly as possible. Does anyone have a recommendation on how to do it? So far, you can upload an image which then is checked for its dimensions. If necessary, the user is

Re: [PHP] Self Submitting Form

2004-02-20 Thread Toby Irmer
Hi Sam, I am not sure I know what you want to do... I tried to recreate your problem: test.html form name=myform1 method=get action= input type=hidden name=myvar1 value=testing script window.open(test2.html, test); /script /form test2.html BODY

Re: [PHP] Pulling two field from mysql table into an array

2004-02-02 Thread Toby Irmer
How 'bout ? $query = SELECT field_name, user_id FROM table; $result = mysql_query($query); while($line = mysql_fetch_assoc($result) { $array[$line[user_id]] = $line[field_name]; } ? - Original Message - From: Richard Kurth [EMAIL PROTECTED] To: Richard Kurth [EMAIL

Re: [PHP] question PHP - HTML

2004-01-26 Thread Toby Irmer
? echo hellobr; echo vivianebr; ? hth toby - Original Message - From: Viviane Hu [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, January 26, 2004 2:13 PM Subject: [PHP] question PHP - HTML Hi, Je try to use PHP. Je wrote to this code ?php echo hello \n;

Re: [PHP] Problems with $_POST

2004-01-21 Thread Toby Irmer
You can use a token to check if a form has been sent before... ? class formReload { var $tokenarray = '__token'; var $tokenname = '__token'; function createToken() { $tok = md5(uniqid(mytoken)); return sprintf(input type='hidden' name='%s'

Re: [PHP] Sorry the attachement was not received!! I put the codes here.

2004-01-20 Thread Toby Irmer
Go check your code for obvious errors before you post it on this list: $Random = 'Random' $result = mysql_query($query1) or die(Query error: . mysql_error()); Now spot the mistake. If you can't... tough luck. toby -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Sorry the attachement was not received!! I put the codes here.

2004-01-20 Thread Toby Irmer
The error is not in that line... check the line before that one. Here, this might be of use... Copy and paste it: ; $result = mysql_query($query1) or die(Query error: . mysql_error()); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Flash .swf outside webroot: width and height problems

2004-01-20 Thread Toby Irmer
Hey everybody, I am trying to display an .swf-file that is stored outside the webroot. Just sending the header and doing a readfile on the swf results in the swf being displayed with the maximum available width and height. Does anyone know a way of displaying Flash with its correct dimensions

Re: [PHP] Flash .swf outside webroot: width and height problems

2004-01-20 Thread Toby Irmer
John W. Holmes [EMAIL PROTECTED] To: Toby Irmer [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, January 20, 2004 7:12 PM Subject: Re: [PHP] Flash .swf outside webroot: width and height problems From: Toby Irmer [EMAIL PROTECTED] I am trying to display an .swf-file that is stored outside

Re: [PHP] How to search the database?

2004-01-19 Thread Toby Irmer
RTFM and stop sending messages to this list with a high priority. The questions you are asking are answered in the first 3 chapters of any good book about php. toby - Original Message - From: Radwan Aladdin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, January 19, 2004 9:13 AM

Re: [PHP] Image Header Issues

2004-01-18 Thread Toby Irmer
- Original Message - From: Toby Irmer [EMAIL PROTECTED] To: Larry Brown [EMAIL PROTECTED]; Bob Eldred [EMAIL PROTECTED]; PHP List [EMAIL PROTECTED] Sent: Saturday, January 17, 2004 2:11 PM Subject: Re: [PHP] Image Header Issues I have the same problem. Strange: I have a session_start

Re: [PHP] Drop down lists

2004-01-18 Thread Toby Irmer
if you say you don't know much, maybe you are looking for something like this ;) hth toby ? function formSelect($name, $options, $value) { echo select name=\$name\\n; foreach($options AS $key = $display) { echo option value=\$key\; if($value == $key)

Re: [PHP] Is this possible ?

2004-01-18 Thread Toby Irmer
One way: ? Function MyFunc() { if(isset($_POST[var])){ $sql = mysql_query(select * from table_name where field=\$_POST[var]\); $num = mysql_num_rows($sql); // I want to use this result outside this function. $returnsomething =blah blah; } return

Re: [PHP] Image Header Issues

2004-01-17 Thread Toby Irmer
I have the same problem. Strange: I have a session_start(); before the header... if I take that out, the image will download as a JPG... so maybe if you find a way to do things in this script without starting the session first... toby - Original Message - From: Larry Brown [EMAIL

Re: [PHP] Thumbnails in database

2004-01-17 Thread Toby Irmer
http://www.sum-it.nl/en200319.php3 quote Create thumbnail a.. Cropping and scaling a photo is surprisingly easy with PHP. b.. Unfortunately the functions imagecreatetruecolor() and imagecopyresampled() exist only since PHP 4.0.6 using GD 2.0.1. Older PHP version supports the functions

Re: [PHP] regexp with mysql

2004-01-15 Thread Toby Irmer
i guess SELECT * FROM `table` WHERE ids REGEXP ',2,|^2,|,2$' should do it... hth toby - Original Message - From: Lowell Allen [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: Thursday, January 15, 2004 4:39 PM Subject: Re: [PHP] regexp with mysql i hope someone can help it

Re: Re[4]: [PHP] Re: jpeg Uploader issue

2004-01-15 Thread Toby Irmer
file: show.php ? header(Content-type: image/jpeg); readfile(/path/to/file/.$_GET[filename]); ? in your files: img src=show.php?filename=myfile.jpg ... or something like that ;) hth toby - Original Message - From: Mike R [EMAIL PROTECTED] To: Richard Davey [EMAIL PROTECTED] Cc:

Re: Re[4]: [PHP] Re: jpeg Uploader issue

2004-01-15 Thread Toby Irmer
that was explaining the prinicple. of course you wouldn't do it like this, but pass an id to identify. you could also send an encryption key... - Original Message - From: CPT John W. Holmes [EMAIL PROTECTED] To: Toby Irmer [EMAIL PROTECTED]; Mike R [EMAIL PROTECTED] Cc: [EMAIL PROTECTED

Re: [PHP] multi-table select?

2004-01-14 Thread Toby Irmer
Try SELECT teams.*, divisions.id AS divisonid, divisions.name AS divisionname FROM teams LEFT JOIN divisions ON teams.divisonID = divisions.divisionID if the ids are the same you can actually also write ON teams.divisonID and omit = divisions.divisionID ... I think. hth toby I'm looking

Re: [PHP] multi-table select?

2004-01-14 Thread Toby Irmer
i must overlooked that... no wonder my pages all take ages to load *g* ;) ;) - Original Message - From: Martin Towell [EMAIL PROTECTED] To: 'Kirk Babb' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, January 14, 2004 11:52 PM Subject: RE: [PHP] multi-table select? This is a