[PHP] Downloading images through the use of code

2001-01-22 Thread Liam Gibbs
I have a question for a friend of mine (yes, it's actually for a friend of mine). Here is my code below. First of all, am I correct in assuming I could download a file and parse it using fopen("url")? Secondly, if I find an IMG tag, how would I go about grabbing the file that is contained in

Re: [PHP] Selecting max(id) of a table

2001-01-22 Thread Liam Gibbs
$max=mysql_result($result); $max = mysql_num_rows($result). - the L -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

[PHP] Maximum execution time

2001-01-23 Thread Liam Gibbs
Can anyone tell me how to up the max. execution time in PHP? I know it's been said before, but I can't remember how it's done. Liam

[PHP] Parse error

2001-01-23 Thread Liam Gibbs

Re: [PHP] Parse error

2001-01-23 Thread Liam Gibbs
Should probably put the whole thing. Why does this produce a parse error (I know that include statements do weird things to if structures): if($username != "") { code code code } else { include("file.php3"); } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail:

[PHP] Problems with Linux PHP

2001-03-19 Thread Liam Gibbs
I'm having a couple of problems while porting some software from Lynx OS to Linux. Here they are: 1. The encryption method seems to be different. Does anyone know the salt to use in the crypt() function in Linux? 2. Also, I seem to not be able to popen() in Linux. I get a file pointer which

Re: [PHP] Problems with Linux PHP

2001-03-19 Thread Liam Gibbs
I'm having a couple of problems while porting some software from Lynx OS to Linux. Here they are: 1. The encryption method seems to be different. Does anyone know the salt to use in the crypt() function in Linux? 2. Also, I seem to not be able to popen() in Linux. I get a file pointer which is

[PHP] posix_pwnam with shadow passwords

2001-03-19 Thread Liam Gibbs
I'm using a system that uses shadow passwords, and I'm wondering if there is a way to make posix_pwnam go around that, so that all my passwords returned don't end up being 'x'. Is there a way to do this with posix_pwnam or another command? RIght now, I'm using an ugly hack, but would much

[PHP] New Server, Bad Attitude

2002-04-03 Thread Liam Gibbs
My friends' server is giving me a hard time. What happened is (long story short) he was forced to use a new server for the web sites on his old one. One of them was mine. I'm experiencing some weirdness now: 1. PHP automatically sticks in the backslash in front of apostrophes and quotation marks.

[PHP] New Server, Bad Attitude

2002-04-03 Thread Liam Gibbs
My friends' server is giving me a hard time. What happened is (long story short) he was forced to use a new server for the web sites on his old one. One of them was mine. I'm experiencing some weirdness now: 1. PHP automatically sticks in the backslash in front of apostrophes and quotation marks.

Re: [PHP] New Server, Bad Attitude

2002-04-05 Thread Liam Gibbs
Thanks to Tyler Longren, Hiroshi Ayukawa, and Matt Schroebel for your help. I've made big changes; the encryption thing is still throwing me for a loop, but the other two are fixed up (mostly). __ Do You Yahoo!? Yahoo! Tax Center - online filing

[PHP] Speaking of sockets...

2002-04-05 Thread Liam Gibbs
... I gotta problem with them. I'm trying to connect to the server (same one from which the page is at). My code is as follows: if($searchsocket = fsockopen(127.0.0.1, 8080, $errornumber, $errormessage, 30)) { Obviously 127.0.0.1 is not the real IP address. But it's at this point that it's

Re: [PHP] file locks

2002-04-09 Thread Liam Gibbs
Is there a way for a script to tell if the file it's trying to access is locked by other script (via flock()) or not. I need to make script wait untill other script running in a parallel thread releases the lock on the file. Without testing, would this work? Just a suggestion (read: shot in the

[PHP] IE 6 is Doing Something Weird

2002-06-13 Thread Liam Gibbs
It seems I can't set cookies in IE 6. Well, I haven't tried myself, as I'm a little bit wary of installing this over my current version of IE (and won't be able to downgrade afterward, thanks to Microsoft logic). Reported from a couple of the users on my site who use IE 6, they can't log in,

[PHP] Exim sendmail faults

2002-07-03 Thread Liam Gibbs
I apologize; this may be more a question for the people in php-install. But I'm having some problems with my mail stuff in PHP. I have Exim version 3.12 installed, but I'm not getting any mails sent out by PHP. I *do* get this error mail, however: This is automatically emailed back to me: This

Re: [PHP] Exim sendmail faults

2002-07-04 Thread Liam Gibbs
the addresses before hand so I don't understand why the mail delivery is not working... thx, Liam -Original Message- From: Liam Gibbs [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 03, 2002 12:58 PM To: [EMAIL PROTECTED] Subject: [PHP] Exim sendmail faults I apologize; this may

Re: [PHP] Exim sendmail faults

2002-07-04 Thread Liam Gibbs
Jason Wong wrote: On Thursday 04 July 2002 23:47, Liam Gibbs wrote: Are you able to do an nslookup of these domains from the server? Those, of course, were just example email addresses (I'd replaced them before sending out this email so it would be more clear). If I use a real email

Re: [PHP] AdRotator for PHP?

2002-07-04 Thread Liam Gibbs
I'm wondering if anyone has found or ended up writing something similar to the MSWC AdRotator object in ASP, but for PHP? Or is there already a module on apache.org that I missed? (Figre I should pull my weight on this list here.) Hmm. Not sure exactly what MSWC AdRotator is, but here's

Re: [PHP] Exim sendmail faults

2002-07-04 Thread Liam Gibbs
). On this server is a Debian Linux box which runs Apache with PHP, the Exim mail server, etc. So, any idea what I could be missing from my configuration that would let me ping addresses nslookup them but not send mail to them? Any other questions/information needed? thx for the help! Liam

Re: [PHP] Exim sendmail faults

2002-07-04 Thread Liam Gibbs
You may want to post this on the nslug.ca list; some mail guru's read it. /mt Cool, I'll check it. ttyl. At 01:58 PM 7/4/2002 -0400, Liam Gibbs wrote: Chris Hewitt wrote: I was going to ask you whether a normal user on your computer could send mail (OK, root counts). As the answer

Re: [PHP] Exim sendmail faults

2002-07-04 Thread Liam Gibbs
for a world trip. This ain't much help - Miles Sure it is! If I take 100 small steps I'll get the equivalent of one big step! ttyl. At 02:21 PM 7/4/2002 -0400, Liam Gibbs wrote: Miles Thompson wrote: Unfortunately I discarded the earlier messages, so I don't know what your error

Re: [PHP] øøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøøø

2002-07-09 Thread Liam Gibbs
Oh, for Pete's sake, GROW UP, man! Stop and think for a second! Why not try visiting php.net like you did to sign up (http://www.php.net/mailing-lists.php) instead of spamming the rest of us about with this junk? Just think! Did you do any of that when you signed up?

[PHP] Filename is nothing

2002-07-23 Thread Liam Gibbs
Basic scenario. There's really nothing else to tell except for that. I'm trying to upload a file via a TYPE=FILE control in a form. When I press submit, my $uploadedfile is what it should be, but my $uploadedfile_name is blank. So is my $uploadedfile_size. Any reason?

Re: [PHP] Re: Filename is nothing

2002-07-23 Thread Liam Gibbs
i had SO much trouble finding this out. hope it helps ya Thanks for the help. This was the clincher. I knew that, too, and had it in some forms, but you just pointed out the one thing I was missing. Thanks! __ Do You Yahoo!? Yahoo! Health -

[PHP] PHP Security Leak

2002-04-25 Thread Liam Gibbs
I'm wondering if anyone has any ideas on how to make a login site more secure. Since I'm not really sure if I've explained myself well enough and don't really know how else to say it, I'll just give examples and then you guys can follow suit and mention some oversights: I have a regular logon:

[PHP] Array function to delete

2002-04-25 Thread Liam Gibbs
I've been checking the PHP documentation, but can't find a function that will delete a member of an array, like such: $a = array(1, 2, 3, 4, 5); Use the function, say array_delete($a, 3); and that will delete the third member in the array (which would be 4 above), so that the array would

Re: [PHP] Array function to delete

2002-04-25 Thread Liam Gibbs
Thanks for all your help, everyone, but both suggestions (unset and array_slice) pretty much didn't improve on my current way. I was jsut trying to find a faster way, but unset doesn't seem to be working properly (but I'll need to fiddle more) and the array_slice way is just too intensive.

Re: [PHP] Array function to delete

2002-04-26 Thread Liam Gibbs
But PHP builtins will do exactly this, around 3 times faster, too. :) Yup. This one with array_diff was the winner. Thanks to all for your suggestions and Lars for the working one. Liam __ Do You Yahoo!? Yahoo! Games - play chess, backgammon,

[PHP] Variables not set

2002-04-26 Thread Liam Gibbs
I have a problem with my variables not being set. I have a file I use for constants and functions, structured like so: $this = this; $that = that; . . . function this() { $h = $this; $i = $that; } function that() { } Now, when I run this(), $this isn't set (even though it's above it in

[PHP] Database Duplication

2002-04-29 Thread Liam Gibbs
I'm not sure if this is possible in PHP (maybe it's even an SQL problem, I dunno), but is there a command that will duplicate a database? I need to make a 'mirror' of it that I can dispose of after my user logs out that won't change the source database at all.

Re: [PHP] Database Duplication

2002-04-30 Thread Liam Gibbs
Maybe I should explain myself a little better. Sorry for leaving out what turned out to be crucial details. What is happening is I want to make a test user so that, whenever I log in with that user, I can muck up the database and not worry about what others will see or permanent changes. In the

Re: [PHP] Database Duplication

2002-04-30 Thread Liam Gibbs
I'm going to guess you are using mysql. Dagwood. I always leave details out. Doesn't matter what it is. Yes, it's MySQL, and I'm forwarding this to the list because you're not the only one that caught my oversight. Sorry about that again. Before starting a test, dump your database with the

[PHP] PHP Editors

2002-04-30 Thread Liam Gibbs
Does anybody know of any PHP project editors, something that will group together all the PHP, INC, HTML, CSS files together into one logical project? Preferrably freeware/shareware, obviously. __ Do You Yahoo!? Yahoo! Health - your guide to health

Re: [PHP] Re: PHP Editors

2002-05-01 Thread Liam Gibbs
Thanks to everyone for your suggestions. I went with EditPlus 2. The project features, easy access to all files, and directory-wide search-and-replace functionality are what hooked me. I'm still looking around, though, so if anyone has any other suggestions, let me know. The Zend product looks

[PHP] eregi(mail)

2002-05-10 Thread Liam Gibbs
Does anyone have a decent eregi statement for validating e-mail addresses? I've tried the ones on the site, but there seems to be small bugs with each of them. They tell me that [EMAIL PROTECTED] is an invalid e-mail address. __ Do You Yahoo!?

[PHP] GD library problem

2002-05-14 Thread Liam Gibbs
This is funny: I have getimagesize(), but not createimage() and things like that. Is this because getimagesize() is not part of the GD library...? Or is there a problem with my GD library? Also, is there any resolution to this GIF copyright thing going on with Unisys? I want to be able to resize

Re: [PHP] GD library problem

2002-05-14 Thread Liam Gibbs
getimagesize() is not part of GD. You likely didn't add the GD extension correctly to PHP. That's what I figured, but I wasn't sure about it. Dagnabbit. I'm gonna have to try harder with GD. :) The copyright issue really has nothing to do with PHP. Talk to the GD folks. It is not our

[PHP] Use of an array element

2002-05-14 Thread Liam Gibbs
Is there any way of using an array element in the same line as it is filled? For instance, here's what I have: Say I want the image width of a pic, I have to: $f = getimagesize(certainpic.jpg); print($f[0]); After this, I never use $f anymore. There's no reason to have it hanging around. Is

Re: [PHP] eregi(mail)

2002-05-16 Thread Liam Gibbs
Thanks to all who helped out with the eregi(mail) stuff. I got my problem solved, and on top of that, there were some bugs that I found in the code. Thanks again to everyone. __ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience

[PHP] Leading zeroes

2002-05-23 Thread Liam Gibbs
Does anybody have a clever and efficient way of getting rid of leading zeroes in a string? __ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] Leading zeroes

2002-05-23 Thread Liam Gibbs
From version 4.1.0, $str = ltrim($str, '0') This works excellently. Thanks. One problem that I didn't think of, though: If the number is 0 (only 0), then the string ends up being empty. Is there a way around that? I put an if statement in saying if the string is empty, then the string is 0. Any

RE: [PHP] Leading zeroes

2002-05-23 Thread Liam Gibbs
I'm a newbie, but maybe this'll do it: if ($str!='0') { $str = ltrim($str, '0') } Duh. Sometimes I amaze myself at how stupid I can be. Thanks. :) __ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com -- PHP

[PHP] I'm going to shoot my machine

2002-08-09 Thread Liam Gibbs
Is there any reason why a MySQL query won't run properly in a mysql_query command, but will run properly when I put the *exact same* statement into a textbox that inputs into a mysql_query command? __ Do You Yahoo!? HotJobs - Search Thousands of

[PHP] I'm going to shoot myself

2002-08-09 Thread Liam Gibbs
Is there any reason why a MySQL query won't run properly in a mysql_query command, but will run properly when I put the *exact same* statement into a textbox that inputs into a mysql_query command? UBF. Sorry for the false alarm, guys. I'm gonna go under a rock now. Thanks anyway, Rasmus. Your

[PHP] HTML-based mail with PHP

2002-08-16 Thread Liam Gibbs
Now, this may be more of an e-mail question than a PHP question. For that, I apologize. I'm having trouble with some HTML-based mail with PHP. It's not the regular thing where I can't get it to use the tags instead of just printing them. That part's fine; it comes out HTML-based. My problem is

[PHP] Date conversion problems

2002-08-26 Thread Liam . Gibbs
Having a little trouble with converting dates. I have, in my database, a bunch of dates stored like this: -M. Month is obviously the number of the month (5), not the name (May). I want to convert the format to MMM, (ex: May, 2002), so I used the mktime function. Basically I extract the

[PHP] Re: HTML-based mail with PHP

2002-08-26 Thread Liam . Gibbs
I'm having trouble with some HTML-based mail with PHP. It's not the regular thing where I can't get it to use the tags instead of just printing them. That part's fine; it comes out HTML-based. My problem is the way it's not accessing a certain image. I get a broken link instead of an

RE: [PHP] Date conversion problems

2002-08-27 Thread Liam . Gibbs
mktime generally only works thru 2037. Why not create an array of the months, and index in: $months = array('Jan','Feb',); $enddate = explode(-, $datereuslt[0]); $finaldate = $months[$enddate-1] . -$enddate[1]; That's what I thought I might have to do. It's an alternative, but a

RE: [PHP] Re: HTML-based mail with PHP

2002-08-27 Thread Liam . Gibbs
I've seen this before. I believe it had something to do with Microsoft's screwed up cacheing routine. No guarantees, but delete the contents of your temporary internet files folder and try again. No, that wasn't it. I'm using a newer computer now, and I just tried it. -- PHP General

RE: [PHP] whats wrong with this?

2002-08-28 Thread Liam . Gibbs
(1) for($day = 1; $day 32; $day++){ (2) if($day = $system_day){ (3) echo match!; (4) } . . . Easy enough. One of those things the programmer may not spot, but a casual observer might. In line #2, you have a single =. A comparative = is a double equal (==). The line should

RE: [PHP] resizing an image

2002-08-29 Thread Liam . Gibbs
Could someone show me some php that proportionally resizes an image? I'm collecting user sumbitted images and need them all to be within certain size constraints. What's the simplest, best way to do this? Try out www.php.net/imagecopyresized or http://www.php.net/manual/en/ref.image.php if

RE: [PHP] About html

2002-08-30 Thread Liam . Gibbs
I have one question about html. 1. I have a form with 8 textbox. How can I put the tab order? When I press tab I want to jump from first textbox to textbox number 4 not to number 2. Well, this isn't an HTML list, but I know there is a way. Check out www.htmlhelp.com. Otherwise, Bravenet has

[PHP] Ridding myself of HTML tags

2002-08-30 Thread Liam . Gibbs
I've got a lil problem with HTML tags. Here's the description. My site accepts HTML files by upload. A lot of these files are written in MS Word and then saved as HTML files from that. MS Word likes to put a bunch of garbage at the beginning of the file. Now, when users upload their HTML files,

[PHP] Javascript running on another page

2001-02-16 Thread Liam Gibbs
I'm fiddling around with the fopen function, using it on urls. I now need to know how to run a JavaScript on another page by using PHP. I know I'll be able to do it from the url if only there's a way to run JavaScript from the url (just by using an fopen). Is there a way to run a JavaScript

[PHP] Problems with posix_getpwnam

2001-02-21 Thread Liam Gibbs
What does it mean when I get the line 'posix_getpwnam(username) failed with "Error number not set" in /xx.php3 on line ##' printed? It doesn't return anything anymore. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

[PHP] File command

2001-02-22 Thread Liam Gibbs
I'm using the file command, which reads an entire file and sticks it into an array. I'm trying to read a file from mp3.com, and what I get back is basically that the connection is refused. Doesn't it just load it up like any browser would load it? Is there an equivalent command that wouldn't try

[PHP] Detecting resolution

2003-01-21 Thread Liam . Gibbs
Does anyone know how to detect the resolution of someone's computer? Or is this possible through 'browscapping'? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Detecting posts from outside site

2003-01-21 Thread Liam . Gibbs
Also, speaking of detection, I made a small script that can protect against people downloading your site's forms, modifying their new local copy (and putting an absolute URL in the form's ACTION attribute), and then posting data using the botched form. If it's bulletproof, then I figured this

[PHP] Possible values for get_browser()-css

2003-01-22 Thread Liam . Gibbs
When I run, $r = get_browser(); and take a look at the css value, I get 2. I would have figured that it could only be 0 (not supported) or 1 (supported). What are the possible values for get_browser()'s css, and what do those values mean? -- PHP General Mailing List (http://www.php.net/) To

[PHP] Chmod funk

2003-01-24 Thread Liam . Gibbs
This line of code: if(!is_readable(Constants.inc)) chmod(Constants.inc, 0644); Produces this error: Warning: chmod() [function.chmod]: Operation not permitted in /home/mastersite/public_html/index.php on line 6 What I'm trying to do is determine if Constants.inc is readable. If not, I want to

Re: [PHP] Problem with MySQL Query

2003-07-23 Thread Liam Gibbs
$dbqueryshipping1 = select * from tempuserpurchase where (usersessionid=\$User_Shopping_Id\) and day=\1\ and type'Meal Plans' Tryed both methods and it is still not excluding anything matching Meal Plans Been a short while since I used SQL with my PHP, but try putting NOT instead

[PHP] HTML equivalents of accented characters

2003-08-11 Thread Liam Gibbs
I don't think this has been discussed, although I'm not really sure what you would call these accented characters, so I haven't been able to do a complete search of the archives, so apologies if this has been previously discussed. Is there a function that not only turns into amp;, into quot;,

Re: [PHP] Simple cookie question

2003-08-14 Thread Liam Gibbs
This may be a stupid question, but I'm trying to set up a system where I can take a poll from visitors to my website and then set a cookie so that they can't vote more than once (until they clear their cookies at least). Problem is, I don't want to put it at the top of my page, because what if

Re: [PHP] HTML equivalents of accented characters

2003-08-14 Thread Liam Gibbs
I think php.net/htmlentities will do this. Apparently it *is*, but it won't for me. Any problems with this code? $result[] = é; $result[1] = htmlspecialchars($result[0]); $result[2] = htmlentities($result[0]); Both return the accented E unchanged. -- PHP General Mailing List

Re: [PHP] HTML equivalents of accented characters

2003-08-14 Thread Liam Gibbs
I bet they do, did you check the HTML source as well? My guess is that the source is reading the actual expected output, but your browser views é, as it should of course. Sorry, should have mentioned. The source code reads the actual character, not the eacute;. -- PHP General Mailing List

Re: [PHP] array looping

2003-08-14 Thread Liam Gibbs
I get all the content of file, so everything is in array 0. I need to somehow break up the array by the comma. Wouldn't it be $file_contents = explode(,, $file_contents[0]); as in you've forgotten the array element? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] HTML equivalents of accented characters

2003-08-14 Thread Liam Gibbs
I have no idea what might be the problem, what does your translation table look like? Mine is still coming out as a single character. Here's my code, in case anyone can spot any stupid human error blunder I'm making: $translationtable = get_html_translation_table(HTML_ENTITIES); $string =

[PHP] ^M

2003-04-03 Thread Liam Gibbs
So which is it that will keep my files from having ^M after PHP is finished fopen(), fputs(), and fclose() with them? \n, \r, and \n\r all seem to reinsert ^M at the ends of all my lines.

Re: [PHP] ^M

2003-04-04 Thread Liam Gibbs
It looks like you are viewing a dos/windows file on unix. The ^M is carriage return, which is needed as part of a dos/window end of line sequence (carriage return, line feed) whereas unix uses just line feed. Nope. They're UNIX-created and UNIX-modified. Does it matter if I downloaded them

[PHP] Object-Oriented PHP with MySQL

2003-06-03 Thread Liam Gibbs
Is it efficient to load objects with data from MySQL for PHP? I'm looking into the OO-ness of PHP, and I have an idea of making objects, but would like the data loaded from a SQL source. Is this a good idea?

Re: [PHP] Arrays and Alphabetical order

2003-07-22 Thread Liam Gibbs
I need it to echo out a table with all the A's first, then a blank line, then all the B's, a blank line and so on. I could write 26 different queries, one for each letter of the alphabet, but surely there is a tidier way. Do a query, sorting by the field you need alphabetized. Then do this (and

[PHP] htmlentities()

2003-02-27 Thread Liam Gibbs
I seem to be having trouble with htmlentities(). Maybe someone has a clue I can borrow. Here's my function: function FitForHTML($string) { $asciitable = get_html_translation_table(HTML_ENTITIES); $string = htmlentities($string, ENT_COMPAT); $string =

[PHP] ICQ # validation

2003-03-03 Thread Liam Gibbs
Maybe I'm off my rocker, but I don't see how this can't work. I'm trying to validate an ICQ number, and assuming a valid one is between 7 and 9 numbers. My line of code is this: if(ereg(^[0-9]{7,9}$, $_REQUEST[icqnumber])) { print(a-okay!); } else { print(error msg); } I've submitted

Re: [PHP] file uploads

2003-03-04 Thread Liam Gibbs
1) Do the temp files automatically delete, or do I need to put something in the code to delete them? They do, and I believe it's until the end of the currently-running PHP script. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Number of rows

2003-03-04 Thread Liam Gibbs
I am using the folling code to list all of my tables in a database: however, i would like to show the user how many rows there are in each table (where i have put numrows), how could i do this? This will be costly on process time, but you could just do a SELECT COUNT(*) on all the tables. If

Re: [PHP] crontab

2003-03-04 Thread Liam Gibbs
Can I run a php script in crontab? Do I echo or print? Anyone doing it? This is a serious security hazard. However, what you could do is have a PHP page set cron settings (such as name of file, location, frequency, and importance), then have another cron job (running at a decent frequency) do

Re: [PHP] crontab

2003-03-04 Thread Liam Gibbs
Can I run a php script in crontab? Do I echo or print? Anyone doing it? Well, why don't I just completely misunderstand the question. Sorry, everyone. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] updating pages with php

2003-03-05 Thread Liam Gibbs
The problem I ran into is that mySQL will not allow certain punctuation inside of a record (no comma's). So now I am left trying to figure out how I can have the user update the paragraph without having it in a db. Can someone shoot me in the proper direction? Thanks in advance, your help is

Re: [PHP] updating pages with php

2003-03-05 Thread Liam Gibbs
What I have discovered is that I can manually type it in the mysql server with whatever characters I want, but when I try to update it with a sql file or via the webpage I created with the comma's it gives me errors. I take them out of the sql text and webpage and it works fine. The problem

Re: [PHP] updating pages with php

2003-03-05 Thread Liam Gibbs
$Query = UPDATE $TableName SET Intro_Title = '$Intro_Title', Intro = '$Intro' WHERE ID = '$ID'; But what's being sent to SQL? What's contained in $TableName, $Intro_Title, etc.? And what data types are all those fields? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] updating pages with php

2003-03-05 Thread Liam Gibbs
You are correct and it is apostophe's and not comma's that cause the error. What do I do to get around that? Escape them by putting a slash in front of them. If you have a line of text that says 'This is the problem area I don't want to screw up', put 'This is the problem area I don\'t want to

Re: [PHP] Modifying a string

2003-03-06 Thread Liam Gibbs
I need to modify a string that contains image links like img src=http://www.somedomain/directory/graphics/filename.jpg; to image links like img src=graphics/filename.jpg Maybe something like with str_replace()? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Dollar signs in values

2003-03-06 Thread Liam Gibbs
How is it I can properly get PHP to represent dollar signs when putting it into HTML? I know that dollar signs denote the beginning of a variable, like $reference or $ftpstream or whatever. However, I have a text file that contains (or can contain) values with $ in them. When I open the file

Re: [PHP] Dollar signs in values

2003-03-06 Thread Liam Gibbs
Escape them with a backslash: $text = The amount is \$400.-; All that does is print \$ in my HTML. What's going on is that it will put, say, RR$T into a file when that's typed into a textbox or any typable form control. That's properly saved in the file. So the file will contain RR$T. When

Re: [PHP] Dollar signs in values

2003-03-06 Thread Liam Gibbs
Could you show some code to illustrate the unpredictable results that you get? Here's what I have in my file: [EMAIL PROTECTED]@#%:[EMAIL PROTECTED]@[EMAIL PROTECTED]|#:~December, 2003~on~fjskl It's first exploded() by ~, then those values are produced by print() statements, like this one:

Re: [PHP] Dollar signs in values

2003-03-06 Thread Liam Gibbs
I'll try the single quotation mark method first, though. Single quotations didn't seem to work either. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] javascript

2003-03-07 Thread Liam Gibbs
in my php script registration1.php, i have written javascript for form validation i.e. for checking if the mandatory fields are filled correctly or not. but on clicking the submit button, i get connected to the next page without the form getting validated!! What's wrong with using PHP to

Re: [PHP] javascript

2003-03-07 Thread Liam Gibbs
If you want to validate form data before sending it, javascript is the choise. Yeah, before sending it. Just wondering what the advantage is in validating before sending. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Stupid Question

2003-03-07 Thread Liam Gibbs
How do you make a command not return a warning... I thought it was the @ sign, but i think i'm wrong, and everything i've tried hasn't worked, i want this for a switch command if that matters. It's the @ sign. Put it right before the command, as in @fopen(). Show us the line that is giving you

[PHP] Min and max of array

2003-03-07 Thread Liam Gibbs
Is there a way to find the minimum and maximum values of an array? min() and max() don't take arrays.

Re: [PHP] Min and max of array

2003-03-07 Thread Liam Gibbs
you can sort it and get the values. I would, but I need the array in the same order. I can't sort it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] $PHPSESSID

2003-03-07 Thread Liam Gibbs
First of all, thanks all who helped with the min and max functions (that works) and the dollar sign bit (which also works). Kudos. Couldn't have done it without y'all! Here's the newest brain teaser: I have cookies disabled (well, I have IE set to the highest security mode, where it disables

Re: [PHP] Resizing Images Uploaded to Web Page

2003-03-08 Thread Liam Gibbs
I have users uploading images to a server and need to have those files resized on upload. I looked under filesystem, but found nothing like that. Anyone? Check the GD extension. You'll need that installed, and the images can't be GIFs (must be JPEGs or TIFs, something like that). Anyway, there

Fw: [PHP] Resizing Images Uploaded to Web Page

2003-03-08 Thread Liam Gibbs
You'll need to either use the gd functions, or my recommendation, get the imagick module and use it. Both should do an excellent job. iMagick is in PEAR. How is PEAR making out? What makes it better than using the GD extension? I will need to do image manipulation (much like the original

Re: [PHP] variable string names

2003-03-08 Thread Liam Gibbs
You could probably do this. Set up a $$where variable, which would contain where . $i, $i being the iterator of your loop. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] true, false

2003-03-09 Thread Liam Gibbs
Why is it the following code produces nothing? $responsesubmitted = FALSE; print($responsesubmitted); I have an if statement that says if($responsesubmitted), but it doesn't work.

Re: [PHP] fopen and PHP 4.3.x

2003-03-10 Thread Liam Gibbs
This is the code around line 30. $local_file = $feed; $fp = fopen($local_file, r); Anyone have any ideas? I have looked over the manual and the only thing I could find similar to this is in the comments. Apache was restarted. I get the same thing so I'm working through it. But here

[PHP] Adding dates

2003-03-11 Thread Liam Gibbs
Does anyone know a link to find the recent discussion on this list about adding dates in PHP? I can't seem to find it in the archives, and the simple act of adding one week to a date seems to be a mindblowing headache using PHP mktime() and date().

Re: [PHP] Adding dates

2003-03-11 Thread Liam Gibbs
http://www.php.net/manual/en/function.strtotime.php Thank you, Sebastian. I never even took a look at this function before. This was a complete lifesaver! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] how to force a refresh?

2003-03-12 Thread Liam Gibbs
but of course no luck. Is there a way I can force a refresh from my script? There is an HTML solution, but I can't remember offhand what it is. HTML would be the only way to go, I'd say, since once the page is in the browser's hands, PHP can't do anything about it. -- PHP General Mailing List

  1   2   >