Re: [PHP] Re: filtering filename.ext on file-upload.

2004-01-15 Thread Louie Miranda
if JPEG is = image/pjpeg how about PDF files? thanks, Louie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: filtering filename.ext on file-upload.

2004-01-15 Thread Louie Miranda
code> if ($_FILES['imagefile']['type'] != "image/pjpeg") >The 'type' in $_FILES is provided by the browser. IIRC only IE uses >"image/pjpeg" whilst other browsers use "image/jpeg". But regardless of what >the browser sets, it is more reliable to get the image type from >getimagesize(). If im go

Re: [PHP] filtering filename.ext on file-upload.

2004-01-15 Thread daniel
>> On Friday 16 January 2004 10:10, Louie Miranda wrote: >>> How can you filter the extension for files being uploaded on a system >>> via form. >> >> Use pathinfo() to get the file extension. >> >> -- > > I suggest you check out the pear Upload class, its exactly what you > need. > http://pear.ph

Re: [PHP] filtering filename.ext on file-upload.

2004-01-15 Thread daniel
> On Friday 16 January 2004 10:10, Louie Miranda wrote: >> How can you filter the extension for files being uploaded on a system >> via form. > > Use pathinfo() to get the file extension. > > -- I suggest you check out the pear Upload class, its exactly what you need. -- PHP General Mailing List

[PHP] Re: filtering filename.ext on file-upload.

2004-01-15 Thread Ben Ramsey
How can you filter the extension for files being uploaded > on a system via form. Use pathinfo() ... check it out at http://www.php.net/manual/en/function.pathinfo.php -Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] filtering filename.ext on file-upload.

2004-01-15 Thread Jason Wong
On Friday 16 January 2004 10:10, Louie Miranda wrote: > How can you filter the extension for files being uploaded on a system via > form. Use pathinfo() to get the file extension. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hos

Re: [PHP] a clean way to upload

2004-01-15 Thread Jason Wong
On Friday 16 January 2004 10:32, Matt Hedges wrote: > if ($_FILES['imagefile']['type'] != "image/pjpeg") The 'type' in $_FILES is provided by the browser. IIRC only IE uses "image/pjpeg" whilst other browsers use "image/jpeg". But regardless of what the browser sets, it is more reliable to ge

[PHP] Re: server hanging on php site

2004-01-15 Thread Ben Ramsey
I don't see any errors or an increased cpu/memory load. First of all, make sure that display_errors in your php.ini file is set to On. I believe that the distribution file that comes with PHP has it set to Off by default. Once it's set to On, see if you can get it to generate an error and post

[PHP] a clean way to upload

2004-01-15 Thread Matt Hedges
Hello all, After playing around with the options, I've found that the following method for uploading something with constraints is the easiest... The sample below first checks for 3 constraints (jpg, size, and width) and if it is cool it uploads it but renames it first...

[PHP] Re: filtering filename.ext on file-upload.

2004-01-15 Thread Matt Hedges
try this, it works for me: if ($_FILES['imagefile']['type'] != "image/pjpeg") { print("File must be a .jpg. File will not be accepted; please choose a .jpg picture or convert the picture to .jpg format."); unlink($filename); // This will remove the temporary file so we don't have to deal wit

Re: [PHP] URL rewriting...anybody done this?

2004-01-15 Thread Ryan A
Hey Justin, Ok, tried this with differient tests and directives for the past 2 days, on 3 differient servers, on 5 differient domains. I updated the directives more times than I care to remember and restarted apache so many times I dont think it knows if its coming or goingbut you sir...are a

[PHP] filtering filename.ext on file-upload.

2004-01-15 Thread Louie Miranda
How can you filter the extension for files being uploaded on a system via form. here are my codes: ## code ## $catchfile = $_FILES['userfile']['name']; $uploaddir = '/var/www-upload'; $uploadfile = $uploaddir . $catchfile; if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { ##

Re: [PHP] Variables

2004-01-15 Thread Brian V Bonini
On Thu, 2004-01-15 at 16:47, Alex Hogan wrote: > How do you insert a php variable into a javascript function? > For instance; > function redirect() { location = ; } -- BrianGnuPG -> KeyID: 0x04A4F0DC | URL: www.gfx-design.com/keys Key Server:

Re: [PHP] IIS and PHP 4.2 on NT 4.0

2004-01-15 Thread Kirk Babb
http://php.us.themoes.org/manual/en/install.iis.php Skip down the page to IIS with WinNT, double check what you've done so far. HTH, Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Passthru with Grep and Awk?

2004-01-15 Thread Brian V Bonini
On Thu, 2004-01-15 at 17:06, Carlton L. Whitmore wrote: > I'm having problems getting the following passthru statement to work. It > works fine with the just the grep command. > Help > > echo "\n"; > passthru('/usr/bin/grep " c=2048" " c=32" " c=2" /var/log/messages | > /usr/bin/awk "{prin

Re: [PHP] URL rewriting...anybody done this?

2004-01-15 Thread Justin French
On Friday, January 16, 2004, at 11:04 AM, Ryan A wrote: RewriteEngine On Options +FollowSymlinks RewriteRule ^tt/(.*).php tt.php?id=$1 This is my php page: "; if(isset($_GET["id"])){echo "Got \$_GET[id]";}else{echo "No \$_GET[id]";} print_r($_GET); print_r($_REQUEST); print_r($_GET['id']); ?> Rya

[PHP] test message

2004-01-15 Thread Sungpill Han
why i can't post! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] IIS and PHP 4.2 on NT 4.0

2004-01-15 Thread John W. Holmes
Todd Cary wrote: I am running PHP 4.0.6 on IIS and NT 4. I cannot get PHP 4.2 to run. Is there something simple I am overlooking? Yes. http://www.bigredspark.com/questions-with-yes-or-no-answers.html -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect:

[PHP] IIS and PHP 4.2 on NT 4.0

2004-01-15 Thread Todd Cary
I am running PHP 4.0.6 on IIS and NT 4. I cannot get PHP 4.2 to run. Is there something simple I am overlooking? Todd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mysql question

2004-01-15 Thread Miles Thompson
Christian, A red flag is flying. Usually, when people start talking about how the number of tables will multiply in an application, there is a problem with the design of data structures. If that's the case, now is the time to fix it. Miles At 05:35 PM 1/15/2004 +, Christian Calloway wrote

[PHP] Re: PHP Includes and Echoes (Sorry; read this post first!)

2004-01-15 Thread Freedomware
Sheez, I spotted my error regarding "$statename." I changed it to the following, and it fixed that problem. $todayDate = date("m-d-Y"); echo 'Freedomware > ' . $statename . ''; echo ''; echo ''; echo ''; if($includea1 == TRUE){ echo ''; } echo ''; ?> -- PHP General Mailing List (http://www.

[PHP] Re: PHP Includes and Echoes (Sorry; read this post first!)

2004-01-15 Thread Freedomware
I should have played with this some more before I posted more questions. After fixing an error on the included page, I replaced every instance of na/a1 on both pages with a1. That seemed to fix everything; the first style sheet comes through, but the second one is blocked - and I don't see any

[PHP] server hanging on php site

2004-01-15 Thread Bryan Koschmann - GKT
Hello, I'm running PHP 4.3.1 on Apache 2.0.48 (on Slackware). I've been having an issue where accessing a certain PHP page causes the whole httpd to stop responding momentarily; no sites will load, those that are loading stop in the middle. But after say 30-45 seconds it continues just fine. I do

[PHP] Re: PHP Includes and Echoes in Head Sections and Search Engines

2004-01-15 Thread Freedomware
Oops, I spotted some big errors in my included page already. Here's the new page: $todayDate = date("m-d-Y"); echo 'Freedomware > "$statename"'; echo ''; echo ''; echo ''; if($includena/a1 == TRUE){ echo ''; } echo ''; ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vis

[PHP] Re: PHP Includes and Echoes in Head Sections and Search Engines

2004-01-15 Thread Freedomware
I wrote: ? But suppose there's a certain page where I don't want the style sheet in ? the middle - the one I named MIDDLE. Is there a way to mark it in the ? include page, then instruct the main page to either not import it or ? replace it with nothing ("")? Luke wrote: youd have to use a varia

Re: [PHP] URL rewriting...anybody done this?

2004-01-15 Thread Ryan A
Hey, Thanks for replying. Globals are on heres my phpinfo page: http://cheap-php-web-hosting.com/phpinfo.php this is my .htaccess file: RewriteEngine On Options +FollowSymlinks RewriteRule ^tt/(.*).php tt.php?id=$1 This is my php page: "; if(isset($_GET["id"])){echo "Got \$_GET[id]";}else{e

Re: [PHP] URL rewriting...anybody done this?

2004-01-15 Thread Peter Vertes
I had the same problem with PHP after I've upgraded to 4.3.3 from 4.3.1.  I was tearing my hair out but couldn't figure out what was wrong.  I ended up editing my php.ini file and turning REGISTER GLOBALS = On.  It works fine now and since this is on my development box I don't really care about

RE: [PHP] Locking and unlocking records

2004-01-15 Thread Williams, Olwen - SAL
One way to do this is to keep a copy of the old record in a session variable. When you com to write the data back read the record again and see if it is still the same. If it is you can save the changes, otherwise give an error saying that the data has been changed, and probably refuse to do the

Re: [PHP] addslashes

2004-01-15 Thread memoimyself
Hello João, On 15 Jan 2004 at 17:07, João Cândido de Souza Neto wrote: > I'm using str_replace("\r\n","\\r\\n",addslashes($campo)) to add "\" in > mysql data to send to javascript variable. > > Running in my machine with win xp + iis it's all ok, but in server with > linux + apache, the javascri

[PHP] Imagesettile problems

2004-01-15 Thread Williams, Olwen - SAL
I asked earlier about filling an image with a pattern. I have figured out how to do it (or at least how I ought to do it using imagesettile() and a filled shape or an imagefill. But it doesn't work. $tile2 = @imagecreatefrompng ("fill1.png"); imagepng ($tile2); displays the fill I want to use.

Re: [PHP] Variables

2004-01-15 Thread Ben Ramsey
AH> How do you insert a php variable into a javascript function? AH> function redirect() { location = ; } function redirect () { location = ; } or use: function redirect () { location = ; } The short syntax only works with short_open_tag enabled in php.ini or with ini_set(). -Ben -- PHP General

Re: [PHP] Variables

2004-01-15 Thread Ben Ramsey
AH> How do you insert a php variable into a javascript function? AH> function redirect() { location = ; } function redirect () { location = ; } or use: function redirect () { location = ; } The short syntax only works with short_open_tag enabled in php.ini or with ini_set(). -Ben -- PHP General

Re: [PHP] Passthru with Grep and Awk?

2004-01-15 Thread Jason Wong
On Friday 16 January 2004 06:06, Carlton L. Whitmore wrote: > I'm having problems getting the following passthru statement to work. It > works fine with the just the grep command. > Help > > echo "\n"; > passthru('/usr/bin/grep " c=2048" " c=32" " c=2" /var/log/messages | > /usr/bin/awk "{prin

Re: [PHP] Variables

2004-01-15 Thread Ben Ramsey
AH> How do you insert a php variable into a javascript function? AH> function redirect() { location = ; } function redirect () { location = ; } or use: function redirect () { location = ; } The short syntax only works with short_open_tag enabled in php.ini or with ini_set(). -Ben -- PHP General

Re: [PHP] Locking and unlocking records

2004-01-15 Thread Jason Wong
On Friday 16 January 2004 04:49, Lowell Allen wrote: > I need to implement database record locking and unlocking. I want to > prevent multiple users of a content management system from editing the same > record simultaneously, which can result in one user's edits being > overwritten. I can use PHP

Re: [PHP] Variables

2004-01-15 Thread Richard Davey
Hello Alex, Thursday, January 15, 2004, 9:47:27 PM, you wrote: AH> How do you insert a php variable into a javascript function? AH> function redirect() { location = ; } function redirect () { location = ; } -- Best regards, Richardmailto:[EMAIL PROTECTED] -- PHP

[PHP] mysql question

2004-01-15 Thread Christian Calloway
Hey, Sorry to post a mysql question here, but I wanted an answer from a PHP perspective. I am currently working on a database (for work) which contains 40 tables, and will continue to expand. The reason for expansion of tables is to obscure to get into, but the relationships all do make sence. I h

[PHP] Re: PHP Includes and Echoes in Head Sections and Search Engines

2004-01-15 Thread Luke
? Holy cow, this gets simpler all the time. Pretty soon, there'll be ? nothing left on my page but PHP includes and echo functions! ? ? Does this cut down on a website's file size? In other words, are the php ? includes effectively inactive when no one's viewing your main pages, ? leaving them emp

[PHP] Re: MMCache.....zend or PHP extention?

2004-01-15 Thread Manuel Lemos
Hello, On 01/15/2004 07:49 PM, Ryan A wrote: Hi all, I have just kind of installed MMCachenow as what do i add it in my php.ini file? as a zend extention or a PHP one? which one is better...couldnt find any details on the websitewhats the diff anyway? If anyone here is active on the MMCac

[PHP] Image Header Issues

2004-01-15 Thread Bob Eldred
Well, I've done a lot of web searching, and a lot of experimentation, but haven't hit upon a fix for my issue yet. Currently, images are served on a site I'm working on in two ways: 1) Free Images are served normally (). 2) Non-Free Images are served through a PHP wrapper with authentication func

[PHP] Passthru with Grep and Awk?

2004-01-15 Thread Carlton L. Whitmore
I'm having problems getting the following passthru statement to work. It works fine with the just the grep command. Help \n"; passthru('/usr/bin/grep " c=2048" " c=32" " c=2" /var/log/messages | /usr/bin/awk "{print $1 $3 $5}" '); ?>

[PHP] Re: PHP Includes and Echoes in Head Sections and Search Engines

2004-01-15 Thread Freedomware
i just changed the opening and closing tags a little (you didnt need so many) but the main change is, now the variables come before the included file, so that the include file can access those variables too. Holy cow, this gets simpler all the time. Pretty soon, there'll be nothing left on my page

Re: [PHP] How can I read 8 bytes from a binary file and cast it as a double?

2004-01-15 Thread Marek Kilimajer
http://www.php.net/unpack SVERRE WISLØFF wrote: How can I read 8 bytes from a binary file and cast it as a double? sw -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] How can I read 8 bytes from a binary file and cast it as a double?

2004-01-15 Thread SVERRE WISLØFF
How can I read 8 bytes from a binary file and cast it as a double? sw -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Imap function problems

2004-01-15 Thread Daryl Meese
The contents of the mail file are located below -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: Thursday, January 15, 2004 3:42 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Imap function problems On Friday 16 January 2004 05:19, Daryl Meese wrote: > I am having some s

[PHP] MMCache.....zend or PHP extention?

2004-01-15 Thread Ryan A
Hi all, I have just kind of installed MMCachenow as what do i add it in my php.ini file? as a zend extention or a PHP one? which one is better...couldnt find any details on the websitewhats the diff anyway? If anyone here is active on the MMCache project...think about adding a FAQ on the

[PHP] Variables

2004-01-15 Thread Alex Hogan
How do you insert a php variable into a javascript function? For instance; function redirect() { location = ; } alex hogan ** The contents of this e-mail and any files transmitted with it are confidential and

Re: [PHP] Imap function problems

2004-01-15 Thread Jason Wong
On Friday 16 January 2004 05:19, Daryl Meese wrote: > I am having some strange problems -- code I tested a while back has broken > and I'm not sure why. > > I am receiving an email with an attachment (testing.doc). when I get the > message I call imap_fetchstructure then check the length of the p

Re: [PHP] best paractice example page creation php / mysql

2004-01-15 Thread Luke
Yeah, its fine, as long as your while loop ends just after a quick glance, it looks like an infinite loop, you might try instead of while (count($aListItems)){ try while (isset($aListItems[$i])){ or while ($i < count($aListItems)){ -- Luke "Jon Bennett" <[EMAIL PROTECTED]> wrote in message news

[PHP] Imap function problems

2004-01-15 Thread Daryl Meese
Hello All, I am having some strange problems -- code I tested a while back has broken and I'm not sure why. I am receiving an email with an attachment (testing.doc). when I get the message I call imap_fetchstructure then check the length of the parts array, which is one. It used to always be (a

Re: [PHP] Converting a TIFF image to PDF

2004-01-15 Thread Jason Wong
On Friday 16 January 2004 05:06, Todd Cary wrote: > I am looking for an example of converting a TIFF image file to a PDF > file that can be viewed by the user. It would be helpful if ths can be > done on the fly using the PdfLib functions. Does anyone have some > sample code for doing this in PHP?

[PHP] PDFlib error 2516

2004-01-15 Thread Mark Wouters
Hello! Tried out this simple script from a tutorial on creating PDF with PHP: However got this error: Fatal error: PDFlib error: [2516] PDF_findfont: Metrics data for font 'Arial' not found in /usr/local/psa/home/vhosts/resilion.be/httpdocs/test/createpdf.php on line 23 Does anyone have an id

Re: [PHP] Where is the mistace? Warning: ftp_put(): 'STOR ' not understood.

2004-01-15 Thread Luke
hmm, well that sure is strange. cuz here http://au3.php.net/ftp_put someone got it working...ahh i see, they used FTP_ASCII, so its the default anyways...hmmm might be a bug, because FTP_BINARY is just a constant, so it has a numerical value, (eg 2003 (i dont think thats it)) but in theory ftp_put

[PHP] Re: PHP Includes and Echoes in Head Sections and Search Engines

2004-01-15 Thread Luke
hi Very simple problems, good to see ur getting the hang of it :) the first is, you have defined your variables after you include the page, so that the echo is outputting a blank variable... so instead of: make it '; include ("../../../../includes/javascript.php"); include ("../../../../i

RE: [PHP] PHP Includes and Echoes in Head Sections and Search Engines

2004-01-15 Thread Arthur Pelkey
You are defining the vars after the header/title has already been processed, put it before the head.php, and it should work -Original Message- From: Freedomware [mailto:[EMAIL PROTECTED] Sent: Thursday, January 15, 2004 3:54 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP Includes and Echoes

[PHP] Converting a TIFF image to PDF

2004-01-15 Thread Todd Cary
I am looking for an example of converting a TIFF image file to a PDF file that can be viewed by the user. It would be helpful if ths can be done on the fly using the PdfLib functions. Does anyone have some sample code for doing this in PHP? Todd -- PHP General Mailing List (http://www.php.ne

RE: [PHP] Where is the mistace? Warning: ftp_put(): 'STOR ' not understood.

2004-01-15 Thread Jay Blanchard
[snip] That shouldnt matter, because FTP_BINARY is a constant, and therfore has a numeric, or string value. The only way FTP_BINARY would become a physical string is if there was quotes around it. As for the problem, are you sure you have the right connection open, because the error (STOR not unde

Re: [PHP] PHP Includes and Echoes in Head Sections and Search Engines

2004-01-15 Thread CPT John W. Holmes
From: "Freedomware" <[EMAIL PROTECTED]> > I discovered that includes will apparently work just about anywhere, but > echo functions apparently don't work with the tag and meta tags; > at least, I can't see the word "Alaska" in those locations when I click > View Source in my browser. Look back o

[PHP] Re: Multiple drop downs

2004-01-15 Thread Luke
Well could you do something like this: Connect to the database retreive the entire table into an array, run through the array for each product category (while $i < $category count) and put a nested loop inside to create each dropdown list (or select (in htm)) this then removes the need to conne

[PHP] Building Graphs

2004-01-15 Thread Williams, Olwen - SAL
I was looking into using a graphing object to make graphs from some intranet data, but the libraries I'm looking at are all filled with plain colours and I'd like to use a pattern. I can't find a way to use a pattern fill in the image functions. can anyone tell me if there is a way to use a patte

[PHP] PHP Includes and Echoes in Head Sections and Search Engines

2004-01-15 Thread Freedomware
I'm having a blast with PHP includes and echo functions; I never dreamed they could be so simple and effective. But I have a couple questions relating to head sections and search engines. Consider the following html code: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> http://www.w3.

Re: [PHP] Where is the mistace? Warning: ftp_put(): 'STOR ' not understood.

2004-01-15 Thread Luke
That shouldnt matter, because FTP_BINARY is a constant, and therfore has a numeric, or string value. The only way FTP_BINARY would become a physical string is if there was quotes around it. As for the problem, are you sure you have the right connection open, because the error (STOR not understood)

[PHP] Locking and unlocking records

2004-01-15 Thread Lowell Allen
I need to implement database record locking and unlocking. I want to prevent multiple users of a content management system from editing the same record simultaneously, which can result in one user's edits being overwritten. I can use PHP to lock a record when it's opened, and unlock it when it's up

RE: [PHP] Where is the mistace? Warning: ftp_put(): 'STOR ' not understood.

2004-01-15 Thread Jay Blanchard
[snip] $mode = FTP_BINARY; $picuploadname = $picupload[$i]; $piclocalname = "../pictures/".$piclocal[$i]; ftp_put($conn_ftp,$picuploadname ,$piclocalname ,$mode); [/snip] You cannot put FTP_BINARY into a variable, it then becomes a string instead of a function directive. Cahnge to this and see if

[PHP] Where is the mistace? Warning: ftp_put(): 'STOR ' not understood.

2004-01-15 Thread Harry.de
Does anybody now, what this error message mean? I can see no mistace in my code: $mode = FTP_BINARY; $picuploadname = $picupload[$i]; $piclocalname = "../pictures/".$piclocal[$i]; ftp_put($conn_ftp,$picuploadname ,$piclocalname ,$mode); The connection is correct and the files are putted but there

[PHP] Random(?) blank pages when using sessions

2004-01-15 Thread Matt Grimm
I'm using non-cookie-based sessions for authentication on a page. The session is set like so, which works (these values, along with the SID, are always retrievable): $_SESSION['user'] = $_POST['UserName']; $_SESSION['time'] = time(); My problem is when I get to the protected site area, in which

Re: [PHP] best paractice example page creation php / mysql

2004-01-15 Thread Jon Bennett
Ahh, i was originally thinking of having a examples table, but when writing the post I decided it might not be nessecary :-) ok, that bit I understand fine, it's getting the data into the DB first that's bugging me, would something like this be ok ? function addNews($aArgs, $aListItems, $aTable

[PHP] Re: addslashes

2004-01-15 Thread Justin Patrin
JoãO CâNdido De Souza Neto wrote: Hello to all. I'm using str_replace("\r\n","\\r\\n",addslashes($campo)) to add "\" in mysql data to send to javascript variable. Running in my machine with win xp + iis it's all ok, but in server with linux + apache, the javascript variable no have "\" causing er

Re: [PHP] addslashes

2004-01-15 Thread Marek Kilimajer
Send us the resulting javascript code. João Cândido de Souza Neto wrote: Hello to all. I'm using str_replace("\r\n","\\r\\n",addslashes($campo)) to add "\" in mysql data to send to javascript variable. Running in my machine with win xp + iis it's all ok, but in server with linux + apache, the jav

Re: [PHP] UTF-8 and HTTP headers

2004-01-15 Thread Chris Shiflett
--- Jiøí Nìmec <[EMAIL PROTECTED]> wrote: > I have problem with encoding UTF-8 and PHP scripts. Scripts send > information about encoding and this disallow send HTTP headers. Is > possibility to solve this problem? I don't understand your question, but maybe this will help. HTTP is encoded with I

[PHP] addslashes

2004-01-15 Thread João Cândido de Souza Neto
Hello to all. I'm using str_replace("\r\n","\\r\\n",addslashes($campo)) to add "\" in mysql data to send to javascript variable. Running in my machine with win xp + iis it's all ok, but in server with linux + apache, the javascript variable no have "\" causing error in my script. Anybody know ho

Re: [PHP] MySQL Question

2004-01-15 Thread CPT John W. Holmes
From: "John Taylor-Johnston" <[EMAIL PROTECTED]> > Sorry, don't want to be off-topic, but have found something curious about MySQL 4.0.16-standard. > > It does not seem to prioritise properly. Searching for 'English Canada' > (as opposed to +English +Canada) > gives me all instances of both words

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

2004-01-15 Thread CPT John W. Holmes
From: "Toby Irmer" <[EMAIL PROTECTED]> > 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... Ok. I'm sure the original poster is grateful. Hopefully, if anyone actually searches those things called t

Re: [PHP] best paractice example page creation php / mysql

2004-01-15 Thread Richard Davey
Hello Jon, Thursday, January 15, 2004, 6:23:51 PM, you wrote: JB> The way I was thinking of doing this was to have 3 tables: JB> training_subsections JB> training_list_items JB> training_table_items JB> My problem is, is it a 'reccomended' way of doing things to query the JB> db multiple times

[PHP] addslashes

2004-01-15 Thread João Cândido de Souza Neto
Hello to all. I'm using str_replace("\r\n","\\r\\n",addslashes($campo)) to add "\" in mysql data to send to javascript variable. Running in my machine with win xp + iis it's all ok, but in server with linux + apache, the javascript variable no have "\" causing error in my script. Anybody know ho

[PHP] best paractice example page creation php / mysql

2004-01-15 Thread Jon Bennett
Hi, One of the sections in the site I'm developing is a training section. Within this section there are sub sections which each need the option of having multiple examples added. Each example will be made up of 2 sections a UL list and a 2 column table with a title and intro as well. The way I

[PHP] MySQL Question

2004-01-15 Thread John Taylor-Johnston
Sorry, don't want to be off-topic, but have found something curious about MySQL 4.0.16-standard. It does not seem to prioritise properly. Searching for 'English Canada' (as opposed to +English +Canada) gives me all instances of both words but does not prioritize the display order for 'English Can

[PHP] i can't show two dinamic lit/menu

2004-01-15 Thread E. Ricardo Santos
i can't show two dinamic list/menu per page. the server say: too many server behaviors -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: dynamic list/menu in php

2004-01-15 Thread E. Ricardo Santos
thanks you very much -- - "Are you still wasting your time with spam?... There is a solution!" Protected by GIANT Company's Spam Inspector The most powerful anti-spam software available. http://mail.spaminspector.com "Justin

[PHP] php dinamic list/menu

2004-01-15 Thread E. Ricardo Santos
I have a php page to update records of a table. There are two fields that are used to relate to other tables reason why they are like list/menu. The problem is that these "select" must show the list to me of elements of the table that contains the data but the selected value must update the t

[PHP] Re: dynamic list/menu in php

2004-01-15 Thread Justin Patrin
I didn't really understand most of what you said (your English is really confusing), but you might want to check out DB_DataObject_FormBuilder. It will create forms for editing of DB records with select boxes for foreign keys. There are also lots of new options in the newest CVS version which i

[PHP] dynamic list/menu in php

2004-01-15 Thread E. Ricardo Santos
I have a php page to update records of a table. There are two fields that are used to relate to other tables reason why they are like list/menu. The problem is that these "select" must show the list to me of elements of the table that contains the data but the selected value must update the t

[PHP] Multiple drop downs

2004-01-15 Thread Alex Hogan
Hi All, I am converting a page from asp that is using several drop down lists. Each list contains part of the product list based on the product type. At the moment it is making a connection to the db and populating a list using the product type, closing the connection, then re-opening for ano

Re: [PHP] UTF-8 and HTTP headers

2004-01-15 Thread memoimyself
Hello Jiri, I'm not sure I understand your problem (I had some trouble with your English), but have you tried PHP's utf8_encode() and utf8_decode() functions? Check out the PHP manual in your native language for more information on these functions. Cheers, Erik On 15 Jan 2004 at 12:52, Ji ¡

Re: [PHP] Dynamic Forms

2004-01-15 Thread Justin French
On Friday, January 16, 2004, at 02:15 AM, Robert Temple wrote: Can anyone suggest a PHP solution to creating a form that gets built after a client enters a variable? For example: an automobile insurance form that first asks how many cars you have, and then creates a form with fields for car 1,

Re: [PHP] UTF-8 and HTTP headers

2004-01-15 Thread Jason Wong
On Thursday 15 January 2004 19:52, JiÅÃ NÄmec wrote: > I have problem with encoding UTF-8 and PHP scripts. Scripts send > information about encoding and this disallow send HTTP headers. Is > possibility to solve this problem? If I understand your problem correctly, the solution is to arrange your

Re: [PHP] PHP Calendar.

2004-01-15 Thread Jason Wong
On Thursday 15 January 2004 23:49, Carles Xavier Munyoz Baldó wrote: > > I've seen many classes floating around that do this. Google should turn > > up something. > > Yes, but Google can not return me the users experience whith this classes > for this reason I ask here ;-) The only user experienc

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: <[EMAI

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

2004-01-15 Thread CPT John W. Holmes
From: "Toby Irmer" <[EMAIL PROTECTED]> > file: show.php > > header("Content-type: image/jpeg"); > readfile("/path/to/file/".$_GET["filename"]); > ?> > > > in your files: > > > > or something like that ;) Are you trying to get him to compromise his server? I'm sure that's just a simple suggestio

Re: [PHP] regexp with mysql

2004-01-15 Thread CPT John W. Holmes
How about: SELECT * FROM table WHERE FIND_IN_SET(2,column); where "column" is your table column containing the comma separated list. ---John Holmes... - Original Message - From: "Toby Irmer" <[EMAIL PROTECTED]> To: "Lowell Allen" <[EMAIL PROTECTED]>; "PHP" <[EMAIL PROTECTED]> Sent: T

Re: [PHP] Multiple Queries

2004-01-15 Thread CPT John W. Holmes
From: "Arthur Pelkey" <[EMAIL PROTECTED]> > I have a page that has multiple queries on it, I want to do doing the > following: > > Query a mysql db multiple times in the same page, but i must be missing > something, I keep getting these AFTER the first queryis successful: > > Warning: mysql_fetch_

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

2004-01-15 Thread Toby Irmer
file: show.php in your files: or something like that ;) hth toby - Original Message - From: "Mike R" <[EMAIL PROTECTED]> To: "Richard Davey" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, January 15, 2004 5:03 PM Subject: RE: Re[4]: [PHP] Re: jpeg Uploader issue >

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

2004-01-15 Thread Mike R
Since the link goes directly to the picture, how do I apply the header first? Should I apply it in the html page the link is on? :) Thanks! -Mike > > Hello Mike, > > Tuesday, January 13, 2004, 5:31:47 PM, you wrote: > > MR> That's what I kind of thought, but this is a case where the browser

RE: [PHP] Multiple Queries

2004-01-15 Thread Arthur Pelkey
$result = mysql_query("SELECT * FROM classes3 WHERE c_d_sun='1' AND c_s_sun_1_hr='5'"); while($row = @ mysql_fetch_array($result)) { if($row[c_s_sun_1_hr] != 5) { echo "n/a"; } else { echo "$row[c_s_sun_1_hr]:$row[c_s_sun_1_min]$row[c_s_sun_1_dn]

Re: [PHP] PHP Calendar.

2004-01-15 Thread Carles Xavier Munyoz Baldó
El Jueves, 15 de Enero de 2004 16:42, Brian V Bonini escribió: > On Thu, 2004-01-15 at 09:27, Carles Xavier Munyoz Baldó wrote: > > Hi, > > Is there any PHP function or set of PHP files that allows me to print the > > current month in calendar format ? > > I've seen many classes floating around tha

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 hel

[PHP] Multiple Queries

2004-01-15 Thread Arthur Pelkey
I am new this. I have a page that has multiple queries on it, I want to do doing the following: Query a mysql db multiple times in the same page, but i must be missing something, I keep getting these AFTER the first queryis successful: Warning: mysql_fetch_array(): supplied argument is not a val

Re: [PHP] Dynamic Forms

2004-01-15 Thread Jas
Matt Matijevich wrote: [snip] Can anyone suggest a PHP solution to creating a form that gets built after a client enters a variable? [/snip] php runs on your server so to build the forms based on a user entered form field, the form has to be submitted, so you would have to use javascript to autom

Re: [PHP] PHP Calendar.

2004-01-15 Thread Brian V Bonini
On Thu, 2004-01-15 at 09:27, Carles Xavier Munyoz Baldó wrote: > Hi, > Is there any PHP function or set of PHP files that allows me to print the > current month in calendar format ? > I've seen many classes floating around that do this. Google should turn up something. -- BrianGnuPG ->

Re: [PHP] PHP Calendar.

2004-01-15 Thread Lowell Allen
> Hi, > Is there any PHP function or set of PHP files that allows me to print the > current month in calendar format ? > You should write one. Here's mine, which I'm sure could be improved: HTH -- Lowell Allen function display_calendar($mon, $year) { // find current date and day of the mo

  1   2   >