Re: [PHP] PHP XML Reference

2003-03-13 Thread Javagal S Reddy
Hi Tim, I have used the big ass "Professional PHP 4 XML" book from Wrox for the last 6 months, and i have picked up immense knowledge from that resource. Infact i have gone up in my career to being the lead web developer in my team...and i must atribute it to this book. You can find more info

Re: [PHP] can't get any string replacements to clean this

2003-03-13 Thread Dennis Gearon
I finally got something to do it, at least, in inline code. I couldn't figure out how to remove NULLS, anybody know? A search on: http://marc.theaimsgroup.com/?l=php-general&r=1&w=2 didn't turn anything up. // // WORKIN

[PHP] PHP XML Reference

2003-03-13 Thread Tim Funk
Hi, I am new to PHP, however i have a good handle on C programming and therefore hope to apply those conceps to PHP programming quickly. I am looking for a print reference that can help me to construct a web-based front-end for an application using XML. Any help in this regard will bemuch appr

RE: [PHP] can't get any string replacements to clean this

2003-03-13 Thread Niklas Lampén
What are you trying to get out of that mess? What should the output look like? Niklas -Original Message- From: Dennis Gearon [mailto:[EMAIL PROTECTED] Sent: 14. maaliskuuta 2003 7:51 To: [EMAIL PROTECTED] Subject: [PHP] can't get any string replacements to clean this All i get out of

RE: [PHP] Can't relocate to a specified URL after submit.

2003-03-13 Thread Niklas Lampén
You cannot output anything before headers. Niklas -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 14. maaliskuuta 2003 8:03 To: [EMAIL PROTECTED] Subject: [PHP] Can't relocate to a specified URL after submit. The code looks like: if( $actionflag == "delete"

Re: [PHP] can't get any string replacements to clean this

2003-03-13 Thread Dennis Gearon
ooops, after many hours on this, I had deleted out the final echo statement. I will play with this and see what I get now. \nuncleaned string--\n"); echo($bad_str . "\nn" ); echo( "\ncleaned string--

Re: [PHP] Can't relocate to a specified URL after submit.

2003-03-13 Thread Ray Hunter
Where is the js code in the mix. Try putting an exit; after the header function and see if that works. -- ray On Thu, 2003-03-13 at 23:02, [EMAIL PROTECTED] wrote: > The code looks like: > if( $actionflag == "delete" ) > { > //Delete Table ip_enrollment > $query="delete from ip_enrol

Re: [PHP] PHP and MySQL Full Text Search Problem

2003-03-13 Thread Ray Hunter
Since you are using fulltext search it is going to look for the exact spelling of what you pass in. If you wanted to get matches with Chris then you will want to modify your query by using LIKE. In version 4.0.1 of mysql you can do fulltext search in boolean mode. http://www.mysql.com/doc/en/Ful

Re: [PHP] can't get any string replacements to clean this

2003-03-13 Thread Dennis Gearon
makes no difference .. - Put the arguments inside of double quotes instead of single quotes and then try it. $bad_str = str_replace("\r","\n",$bad_str); - Original Message - From: "Dennis Gearon" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, March 13, 200

[PHP] PHP and MySQL Full Text Search Problem

2003-03-13 Thread Charles Kline
Hi all, My first try at MySQL Full Text Search and it is not behaving ;) Here is what I have for my query string: $sql = "SELECT id, concat(fname, ' ', lname, ' ', degree1) as name". " FROM tbl_personnel WHERE MATCH (fname,lname) AGAINST ('" . $attributes['searchstring'] . "')"; Th

[PHP] Can't relocate to a specified URL after submit.

2003-03-13 Thread Larry_Li
The code looks like: if( $actionflag == "delete" ) { //Delete Table ip_enrollment $query="delete from ip_enrollment where id='$id'"; $AMC_DB->query("$query") or die("database server wasn't available now."); //Delete Table ip_evaluation $query="delete from ip_evaluatio

Re: [PHP] can't get any string replacements to clean this

2003-03-13 Thread Joe Goff
Put the arguments inside of double quotes instead of single quotes and then try it. $bad_str = str_replace("\r","\n",$bad_str); - Original Message - From: "Dennis Gearon" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, March 13, 2003 11:51 PM Subject: [PHP] can't get any string

[PHP] can't get any string replacements to clean this

2003-03-13 Thread Dennis Gearon
All i get out of: str_replace ereg_replace preg_replace is an empty string value. Anybody know why? \nuncleaned string-\n"); echo($bad_str . "\nn" ); echo( "\ncleaned \n"); //Nothing

RE: [PHP] preg_replace question,

2003-03-13 Thread daniel
the current function been put in place replaces [f1253f] with a file, for inside cms content , where 1253 is the key or the id of the filename in the database , therefore to denote its an ftool they added f's around the keys , so maybe i could get away with [1253], what else i'm asking if preg_r

RE: [PHP] Checkboxes

2003-03-13 Thread John W. Holmes
> I am trying to get results form checkboxes on a form. Each checkbox is > given a value of the id of an item in a table. What I want to do is find > out what is selected and from there get the id so I can create a sql > insert > statement for each selected item. > > I can get the item selected

RE: [PHP] preg_replace question,

2003-03-13 Thread John W. Holmes
> yes another one sorry, i'm trying to find the most efficient way to do a > replactment over this > eregi_replace("\[f$key\f\]","$value",format_content($content));, would > preg_replace be quicker and how could i go about it ? > > i'd need to replace [f1247f] with its replacement value better sti

[PHP] Checkboxes

2003-03-13 Thread Stephen
Hi I am trying to get results form checkboxes on a form. Each checkbox is given a value of the id of an item in a table. What I want to do is find out what is selected and from there get the id so I can create a sql insert statement for each selected item. I can get the item selected but not a

[PHP] preg_replace question,

2003-03-13 Thread daniel
yes another one sorry, i'm trying to find the most efficient way to do a replactment over this eregi_replace("\[f$key\f\]","$value",format_content($content));, would preg_replace be quicker and how could i go about it ? i'd need to replace [f1247f] with its replacement value better still maybe

RE: [PHP] trikky string limit question

2003-03-13 Thread daniel
never mind i worked it out function create_caption($content,$max_length,$primaryID,$ID) { if (strlen($content) > $max_length) { $paragraph_i="."; $position=strpos($content,$paragraph_i); if (is_integer($positio

RE: [PHP] Enabling GD library

2003-03-13 Thread daniel
here is my configure line http://electroteque.dyndns.org:1023/phpinfo.php sorry i cannot find the classic gd install tutorial it helped alot >= Original Message From "Sebastian" <[EMAIL PROTECTED]> = >Hello all. > >I have php version 4.3.1, on linux. I want to enable GD library, my guess

[PHP] Enabling GD library

2003-03-13 Thread Sebastian
Hello all. I have php version 4.3.1, on linux. I want to enable GD library, my guess it's already included in the package. How does one enable it? Please give me a step by step mini tutorial how to enable it, a link would be great as well. I don't know a lot about linux, so any help is appreciate

[PHP] GIF images

2003-03-13 Thread Patrick Teague
Ok, considering GIF support was dropped in the latest & greatest... How come on my linux webserver I can get imagecreatefromgif(() to work, but not on my windows test server? The seemingly strange thing is that imagecreatefromgif() seems to be the only gif function that works on the linux server

[PHP] Re: Crypting Passwords for storage.

2003-03-13 Thread Christina
http://www.php.net/crypt http://www.php.net/md5 Philip J. Newman wrote: I have a user admin for a site, how ever passwords are stored in plane text. Is there away to crypt and then read the crypt when verifying that string vs the plane text in the password box? -- Philip J. Newman. Head Develop

[PHP] PEAR DB Error

2003-03-13 Thread Michael A Smith
Hello, I am using a script running PEAR. I did a: $db = DB::connect($database_string); at I get the error: Fatal error: Undefined class name 'db' in /var/www/html/prattcms/variables/global.inc.php on line 17 Any ideas? -Michael -- Some people's minds are like cement; all mixed up and permanentl

Re: [PHP] Crypting Passwords for storage.

2003-03-13 Thread Brad Bonkoski
What about using the md5() function, and store them that way. Then when one is sent to the server encrypt it and so a string compare on the two encrypted text strings. Like strings encrypted with md5 will result in the same encrypted string. Of course there is no way to decrypt them. This is al

[PHP] Re: PHP url variables

2003-03-13 Thread Ron Rudman
Try: parse_str( $_SERVER['QUERY_STRING']); "Stephen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi > > I have just installed PHP 4 and Apache 2 but when I pass a variable in a url > eg ?id=1 > I can't get the variable value by $id, I have to use $_GET['id'] or > $_POST['id'] > >

[PHP] Crypting Passwords for storage.

2003-03-13 Thread Philip J. Newman
I have a user admin for a site, how ever passwords are stored in plane text. Is there away to crypt and then read the crypt when verifying that string vs the plane text in the password box? -- Philip J. Newman. Head Developer [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.ne

[PHP] Generating Statics Pages

2003-03-13 Thread Christina
What is the fastest way to generate multiple static pages? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] ^M in PHP

2003-03-13 Thread sumbry
> > Use a decent text editor that'll save the files in Unix format... even > > if you're on a PC. > > Yeah, I could use a decent text editor, but not everyone who uses my site > will use it. I need something that can edit them out after download. If you don't have that dos2unix conversion utility

RE: [PHP] ^M in PHP

2003-03-13 Thread John W. Holmes
> > Use a decent text editor that'll save the files in Unix format... even > > if you're on a PC. > > Yeah, I could use a decent text editor, but not everyone who uses my site > will use it. I need something that can edit them out after download. Wouldn't it be smarter to eliminate them before it

[PHP] CORRECTION: Problem with cookies

2003-03-13 Thread Andrew Wallace
Oops, messed up the cut'n'paste... Hi all - I am having a problem with cookies. It seems that if I set the domain field in setcookie, nothing happens. I also tried creating the cookie header manually, with the same results. This is what I have: $expireTime = time(); $expireTime += ($daysTo

[PHP] Strange cookie issue

2003-03-13 Thread Andrew Wallace
Hi all - I am having a problem with cookies. It seems that if I set the domain field in setcookie, nothing happens. I also tried creating the cookie header manually, with the same results. This is what I have: $expireTime = time(); $expireTime += ($daysToExpire * 86400); setcookie("Test

Re: [PHP] ^M in PHP

2003-03-13 Thread Liam Gibbs
> Use a decent text editor that'll save the files in Unix format... even > if you're on a PC. Yeah, I could use a decent text editor, but not everyone who uses my site will use it. I need something that can edit them out after download. -- PHP General Mailing List (http://www.php.net/) To unsub

Re[2]: [PHP] DomXML and Zend Engine 2

2003-03-13 Thread Tom Rogers
Hi, Friday, March 14, 2003, 11:54:00 AM, you wrote: ED> On Fri, 14 Mar 2003 11:37:05 +1000, Tom Rogers wrote: >> I think that should be > 1,0 ED> You're right, sorry ED> I've made an error writing this post ("." on the numeric pad output "," in ED> the news client since I'm french) but the

RE: [PHP] ^M in PHP

2003-03-13 Thread John W. Holmes
> I'm downloading a file from Windows to Linux through PHP. Understandably, > there are ^Ms at the end of my lines. Is there a PHP function I can use to > delete them? Use a decent text editor that'll save the files in Unix format... even if you're on a PC. Let's NOT get into a text-editor-sugges

RE: [PHP] Will this do what I think it will?

2003-03-13 Thread John W. Holmes
> I call this file 'clean_gpc.php'. > > Will it: > // trim all control codes and spaces from ends of string > // standardize Window's CRLF in middle of string to \n > // standardize Apple's LF in middle of string to \n > // remove all control characters BELOW \n >

Re: [PHP] DomXML and Zend Engine 2

2003-03-13 Thread Eric Daspet
On Fri, 14 Mar 2003 11:37:05 +1000, Tom Rogers wrote: > I think that should be 1,0 You're right, sorry I've made an error writing this post ("." on the numeric pad output "," in the news client since I'm french) but the script was tested with the correct value ('1.0' with a dot). So ... my

RE: [PHP] What do I do wrong?

2003-03-13 Thread Alex Piaz
At 20:39 13/3/2003 -0500, John W. Holmes wrote: I'm not very good at PHP, but I'd have to say the problem is that you've got an undefined variable called $msg on line 202 in script.php... but I could be wrong. LOL:-) Alex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

RE: [PHP] What do I do wrong?

2003-03-13 Thread John W. Holmes
> Hey everybody, > > I get the message: > > Notice: Undefined variable: msg in > F:\www-root\domain.com\website\script.php on line 202 > > whats wrong? I'm not very good at PHP, but I'd have to say the problem is that you've got an undefined variable called $msg on line 202 in script.php... but

RE: [PHP] Country???

2003-03-13 Thread John W. Holmes
> Hello people. > > I want to know from where Country is the visitor that access to my page in > PHP. So ask them. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] DomXML and Zend Engine 2

2003-03-13 Thread Tom Rogers
Hi, Friday, March 14, 2003, 10:36:50 AM, you wrote: ED> Hi, ED> I'm testing the last php5/ze2 snapshot for a future PHP application. I've ED> a two line script[1] with domxml wich fail with ZE2 but succeed with ZE1. ED> I know that ZE2 is in pre-alpha cycle (and domxml on a experimental state) E

[PHP] PHP url variables

2003-03-13 Thread Stephen
Hi I have just installed PHP 4 and Apache 2 but when I pass a variable in a url eg ?id=1 I can't get the variable value by $id, I have to use $_GET['id'] or $_POST['id'] Is there a setting I need to change to allow me to use the $id? If there is it will save a lot of additional coding. Thanks,

[PHP] imap_get_quota

2003-03-13 Thread Roger Thomas
on the php.net manpage for imap_get_quota, http://www.php.net/manual/en/function.imap-get-quota.php , the imap stream is opened as: $mbox = imap_open("{your.imap.host}","mailadmin","password",OP_HALFOPEN) or die("can't connect: ".imap_last_error()); i am really confused as to how to setup th

[PHP] trikky string limit question

2003-03-13 Thread daniel
hi there , i am trying to show news content , the page may get pretty huge if they all show on the same page , i have been considering a caption of 255 chars max , i would like to know if i could prob limit the front to 255 chars and if its between a word somehow show it till the last . probably

[PHP] please undescribe from mailing list!!

2003-03-13 Thread akira ihaya
[EMAIL PROTECTED] (B (B (B__ (BDo You Yahoo!? (BYahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ (B (B (B-- (BPHP General Mailing List (http://www.php.net/) (BTo unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] If 1 IF fails, do the rest anyway...

2003-03-13 Thread Tom Rogers
Hi, Friday, March 14, 2003, 7:13:15 AM, you wrote: LG> I know that in a case like this LG> if((test1) && (test2) && (test3)) { LG> ... LG> } LG> if test1 fails, dear PHP won't bother doing test2 and 3. Am I correct? Is there a syntax that will make it carry on with test2 and 3 anyway, regar

[PHP] disabel phpinfo()

2003-03-13 Thread sonjaya
yes is working full path of mysql . by the way do you know how to disable phpinfo () 14-03-2003 0:07, Ray Hunter <[EMAIL PROTECTED]> wrote: >make sure you config line has the location of you mysql install.. > >example: >/.configure --with-mysql=/usr/local/mysql --with-apache=../apache_1.3.14 >--e

Re: [PHP] Intermittent CGI Errors

2003-03-13 Thread Tom Rogers
Hi, Friday, March 14, 2003, 7:03:09 AM, you wrote: JG> My app works very well until you start to hit it hard. Then I get JG> CGI Error JG> The specified CGI application misbehaved by not returning a complete set of JG> HTTP headers. The headers it did return are: JG> The output of my script is a

[PHP] trim() not working according to php.net site examples

2003-03-13 Thread Dennis Gearon
The below does not remove the control characters as the site examples show. I was doing it to the $HTTP_POST_VARS, with a whole lot more functionality, but I can't ANY thing to modify the string below :-( Anyone got any ideas why this does not print a string trimmed of all the \t,\r,\n

Re: [PHP] Script Nane in CGI mode

2003-03-13 Thread Tom Rogers
Hi, Friday, March 14, 2003, 6:36:04 AM, you wrote: BY> Hi BY> When you want to know the name of the script you are running you can use BY> : $SCRIPT_NAME. BY> However, this info is not available when running a PHP script in CGI BY> mode. BY> If i have a fine called berber1.php and a link to this

Re: [PHP] SQL DISTINCT with MYSQL

2003-03-13 Thread Vernon
The problem is > a f1 > a f2 > b f1 > b f2 Where I need it to return the a only once and the b only once. For instance the vlaues may be: jimmy login.php jimmy successfullogin.php susan default.php susan search.php Since the records are order the way I need them to be (or else I could use a O

[PHP] DomXML and Zend Engine 2

2003-03-13 Thread Eric Daspet
Hi, I'm testing the last php5/ze2 snapshot for a future PHP application. I've a two line script[1] with domxml wich fail with ZE2 but succeed with ZE1. I know that ZE2 is in pre-alpha cycle (and domxml on a experimental state) and I'm not crying to have something functionnal but I've some questio

Re[4]: [PHP] cropping an image script

2003-03-13 Thread Tom Rogers
Hi, Friday, March 14, 2003, 7:20:10 AM, you wrote: AR> I'm getting a fatal error on the following script using AR> MS Win 98 / Apache Server / PHP 4.1.1. / php_gd.dll AR> Fatal error: imagecreatetruecolor(): requires GD 2.0 or later in AR> c:\apache\htdocs\testphoto.php on line 6 AR> Is there a

RE: [PHP] SQL DISTINCT with MYSQL

2003-03-13 Thread Barajas, Arturo
Vernon, Don't know if I get it right, but: SELECT DISTINCT uname, file FROM useronline should do that. I mean, if you have something like: uname file a f1 a f2 a f1 a f2 b f1 b f2 b f1

[PHP] SQL DISTINCT with MYSQL

2003-03-13 Thread Vernon
I'm setting up a user online system using MySQL where I have 4 fields, all of which is working fine. I need the information from all the fields but want only distinct values based on the uname column. If I use the: SELECT DISTINCT uname FROM useronline of course I come back with the values I des

Re: [PHP] What do I do wrong?

2003-03-13 Thread Tom Woody
On Fri, 14 Mar 2003 00:37:38 +0100 Michael Cronstrom <[EMAIL PROTECTED]> wrote: > I get the message: > > Notice: Undefined variable: msg in > F:\www-root\domain.com\website\script.php on line 202 > > whats wrong? Questions like this and you are asking for trouble... first off how are we suppose

Re: [PHP] Please Help with the Code

2003-03-13 Thread -{ Rene Brehmer }-
On Thu, 13 Mar 2003 23:21:38 +0100, Ernest E Vogelsinger wrote about "Re: [PHP] Please Help with the Code" what the universal translator turned into this: >What I'd do is to validate the user, setup a session where the user id is >stored (which is server side anyway), then branch to different sect

[PHP] Country???

2003-03-13 Thread Odiel
Hello people. I want to know from where Country is the visitor that access to my page in PHP. Gretting. Odiel. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] What do I do wrong?

2003-03-13 Thread Michael Cronstrom
Hey everybody, I get the message: Notice: Undefined variable: msg in F:\www-root\domain.com\website\script.php on line 202 whats wrong? Alexander -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] table cell space under image in IE

2003-03-13 Thread -{ Rene Brehmer }-
I gave up getting the regular table attributes to work correctly in all browsers, so I shifted to stylesheets instead, which seem to be more uniformly handled in all browsers. The value to look for is called padding, and the syntax is: padding: x x x x; where each x is a lenth value, and the ord

[PHP] ODBC Problem

2003-03-13 Thread Kiswa
Hi. I have a problem, Been writing a site in php that uses ODBC systemlink to a Access DB The server is apache The problem is that the final server is win2000 IIS and the thing doesent work. It seems that the odbc connect doesent output any info. It works fine on apache cant figure out what the di

RE: [PHP] Search/Regular Expression problem

2003-03-13 Thread Chris Hayes
At 22:15 13-3-2003, Poon, Kelvin (Infomart) wrote: Yeah my data are from a database. How do I use query to search something like that? well like in my code, suppose you want to look in table 'tablename' in field 'textfield', and you want to show the fields 'title' and 'textfield', and you nee

Re: [PHP] http_session_vars

2003-03-13 Thread Ernest E Vogelsinger
At 22:17 13.03.2003, rotsky said: [snip] >I thought session vars were either POSTed or passed via cookies... [snip] No - you're mixing up the session identifier and session data. The session identifier is just an arb

Re: [PHP] Problem with string comparison

2003-03-13 Thread Ernest E Vogelsinger
At 23:11 13.03.2003, Charles Kline said: [snip] >On Thursday, March 13, 2003, at 05:08 PM, Ernest E Vogelsinger wrote: > >> - if your query is exactly as you sent it here you're missing a comma >> after >> the closing bracket of "concat()", just before "name

Re: [PHP] Please Help with the Code

2003-03-13 Thread Ernest E Vogelsinger
At 22:56 13.03.2003, Dalibor Malek said: [snip] >The function is pretty simple, In this Page is a form where the User can >enter his username and password, when he clicks on submit the script >checks the input with the entries in the database. If its ok the

Re: [PHP] Problem with string comparison

2003-03-13 Thread Charles Kline
On Thursday, March 13, 2003, at 05:08 PM, Ernest E Vogelsinger wrote: - if your query is exactly as you sent it here you're missing a comma after the closing bracket of "concat()", just before "name" name is supposed to be an alias for the concatenated values of fname,lname,mname. Let me try to

Re: [PHP] If 1 IF fails, do the rest anyway...

2003-03-13 Thread Liam Gibbs
> The more efficient compilers/parsers stop when one test fails, some do > them all. I don't know which php does but surely it is irrelevant? If > test1 fails, because of the "and" the "if" statement will not be > executed. I wonder what the reason is for your wanting it to do test2 > and test3, ma

Re: [PHP] Problem with string comparison

2003-03-13 Thread Ernest E Vogelsinger
At 22:31 13.03.2003, Charles Kline said: [snip] >I am trying to get this sql query to work and am getting the error >"Insufficient data supplied". Can anyone help with this? > >$sql = "SELECT id, concat(fname, ' ', lname, ' ', degree1) name >

[PHP] Please Help with the Code

2003-03-13 Thread Dalibor Malek
Hello Folks, I need help. This is my Code: // *** Start the session session_start(); // *** Validate request to log in to this site. $FF_LoginAction = $HTTP_SERVER_VARS['PHP_SELF']; if (isset($HTTP_SERVER_VARS['QUERY_STRING']) && $HTTP_SERVER_VARS['QUERY_STRING']!="") $FF_LoginAction .= "?".$

[PHP] Re: Setting session variables from value in database

2003-03-13 Thread Bobby Patel
are you sure that $row['user_type'] has a (non-null) value? "Mike Tuller" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have a login page and have sessions working so that if a user is in > the database, they can login. I want to also add a "user_type" to the > session so that I

[PHP] Re: Page Rederection Problems

2003-03-13 Thread Bobby Patel
> header("location: http://www.website.com "); I usually use header() like this : header("location: http://www.website.com";); you can try that, maybe it might work. "Kelly Protsko" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Basically what I am doin

Re: [PHP] If 1 IF fails, do the rest anyway...

2003-03-13 Thread Chris Hewitt
Liam Gibbs wrote: I know that in a case like this if((test1) && (test2) && (test3)) { ... } if test1 fails, dear PHP won't bother doing test2 and 3. Am I correct? Is there a syntax that will make it carry on with test2 and 3 anyway, regardless of how test1 came out? The more efficient compile

Re: [PHP] http_session_vars

2003-03-13 Thread rotsky
I thought session vars were either POSTed or passed via cookies... "Cpt John W. Holmes" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > do the session vars get treated with magic quotes? The last comment at the > bottom of: > > > > http://www.php.net/manual/en/function.get-magic-qu

[PHP] Problem with string comparison

2003-03-13 Thread Charles Kline
I am trying to get this sql query to work and am getting the error "Insufficient data supplied". Can anyone help with this? $sql = "SELECT id, concat(fname, ' ', lname, ' ', degree1) name FROM tbl_personnel "WHERE name LIKE \'%"; $sql .= $attributes['nametofind']; $sql .= "%\' ORDE

[PHP] Converting HMLT to Text in PHP

2003-03-13 Thread Steve Vernon
Hiya, I'm working on an email part of a site, normally I just send in text, but for this site I need to send HTML and text. Now I have made the HTML ones, that work fine. Is there a PHP way to convert this to a normal text file for the text emails? It dosent need to be that preety or

[PHP] Setting session variables from value in database

2003-03-13 Thread Mike Tuller
I have a login page and have sessions working so that if a user is in the database, they can login. I want to also add a "user_type" to the session so that I can have regular staff see certain things, and admin's see other things, but I can't seem to pull the information out of the database. H

Re: [PHP] If 1 IF fails, do the rest anyway...

2003-03-13 Thread Jason k Larson
That's exactly what logical operators are for. http://www.php.net/manual/en/language.operators.logical.php use || instead of && for allowing either to be true. if ((test1) || (test2) || (test3)) { \\ if any of these can return true, this will execute } HTH, Jason k Larson Liam Gibbs wrote: I kno

Re: [PHP] If 1 IF fails, do the rest anyway...

2003-03-13 Thread Ernest E Vogelsinger
At 22:13 13.03.2003, Liam Gibbs said: [snip] >I know that in a case like this > >if((test1) && (test2) && (test3)) { >... >} > >if test1 fails, dear PHP won't bother doing test2 and 3. Am I correct? Is >there a syntax that will make it carry on with test

[PHP] Page Rederection Problems

2003-03-13 Thread Kelly Protsko
Basically what I am doing is having a post call a page with the following code to email the form contents. I want the page to redirect back to the page it was sent from after the mail has been sent. The top mailing part works fine but when I put the header redirect in at the bottom I get an err

Re: Re[2]: [PHP] cropping an image script

2003-03-13 Thread Anthony Ritter
I'm getting a fatal error on the following script using MS Win 98 / Apache Server / PHP 4.1.1. / php_gd.dll Fatal error: imagecreatetruecolor(): requires GD 2.0 or later in c:\apache\htdocs\testphoto.php on line 6 Is there a workaround to this function so that I can crop part of the source .jpeg?

Re: [PHP] Search/Regular Expression problem

2003-03-13 Thread Chris Hayes
$WHERE=substr($WHERE,4,strlen($WHERE); um, make that $WHERE=substr($WHERE,4,strlen($WHERE)-4; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Search/Regular Expression problem

2003-03-13 Thread Poon, Kelvin (Infomart)
Yeah my data are from a database. How do I use query to search something like that? -Original Message- From: Chris Hayes [mailto:[EMAIL PROTECTED] Sent: Thursday, March 13, 2003 4:02 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Search/Regular Expression problem At 21:48 13-3-2003, you wr

[PHP] If 1 IF fails, do the rest anyway...

2003-03-13 Thread Liam Gibbs
I know that in a case like this if((test1) && (test2) && (test3)) { ... } if test1 fails, dear PHP won't bother doing test2 and 3. Am I correct? Is there a syntax that will make it carry on with test2 and 3 anyway, regardless of how test1 came out?

Re: [PHP] Wildcard fromURL

2003-03-13 Thread Chris Hayes
At 21:55 13-3-2003, you wrote: mod.php?mod=userpage&menu=215&page_id=xxx mod.php?mod=userpage&menu=20001&page_id=xxx mod.php?mod=site_map&menu=20010 And would want all the following pages to load an image named something like foo_1.jgp mod.php?mod=userpage&menu=1&page_id=xxx submit.php&menu=100 mo

Re: [PHP] Search/Regular Expression problem

2003-03-13 Thread Chris Hayes
At 21:48 13-3-2003, you wrote: My search enginue will bring up a result IF and only if ALL of the words in $search exist in the result. For example if $search = Vax Useful Commands Then the result is only true if (eregi(".*Vax.*Useful.*Commands.*", 'possible result')) is true Are your data in a d

[PHP] Re: Search/Regular Expression problem

2003-03-13 Thread J Smith
If you're splitting them up with preg_split(), you can combine them with implode(). Something like $foo = ".*" . implode(".*", $words); Or don't use an array at all. Just replace anything that's not a valid search character... $regex = preg_replace("/[^A-Za-z]/", ".*", $search); J Kelvin Poo

[PHP] Intermittent CGI Errors

2003-03-13 Thread Joshua Groboski
My app works very well until you start to hit it hard. Then I get CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: The output of my script is a header() redirect so it must be returning a header right? Joshua Grobo

[PHP] Wildcard fromURL

2003-03-13 Thread Verdon Vaillancourt
Hi :) I want to place a particular image on a page based on the URL of the page. I have a variety of standard patterns to match in the URL. For instance; I would want all the following pages to load an image named something like foo_2.jpg mod.php?mod=userpage&menu=2&page_id=xxx mod.php?mod=userpa

[PHP] Search/Regular Expression problem

2003-03-13 Thread Poon, Kelvin (Infomart)
Hi, I am sorry if this problem is too easy but I just can't figure out a way to do this. I am making a search engine and I would have the user to type a sentence to search for. Let's say it is stored in $search. My search enginue will bring up a result IF and only if ALL of the words in $search

RE: [PHP] [RegExp] extracting anchors

2003-03-13 Thread Boaz Yahav
Try these two : A function that parses a string and replaces http://whatever with a link, and email addresses with a mailto link. This function was designed for the motd package. But will work freely on its own. http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1235 How to change a

[PHP] Script Nane in CGI mode

2003-03-13 Thread Boaz Yahav
Hi When you want to know the name of the script you are running you can use : $SCRIPT_NAME. However, this info is not available when running a PHP script in CGI mode. If i have a fine called berber1.php and a link to this file called berber2.php, how can i know in the code if it has been called f

[PHP] Re: PDF Creation

2003-03-13 Thread Alexandru COSTIN
Hello, You should also look at http://www.interakt.ro/products/PDFreportsLite/ It allows you to avoid using the API and concentrate on the reports Alexandru -- Alexandru COSTIN Chief Operating Officer http://www.interakt.ro/ +4021 411 2610 "Christopher J. Crane" <[EMAIL PROTECTED]> wrote in mes

RE: [PHP] PDF Creation

2003-03-13 Thread SED
Try FPDF.org! It's great! Regards, Sumarlidi E. Dadason SED - Graphic Design _ Tel: 896-0376, 461-5501 E-mail: [EMAIL PROTECTED] website: www.sed.is -Original Message- From: Christopher J. Crane [mailto:[EMAIL PROTECTED] Sent: 13. mars 2003 18:05 To: [EM

Re: [PHP] time() question

2003-03-13 Thread Ernest E Vogelsinger
At 18:07 13.03.2003, Tom Ray said: [snip] >Is there an easy way to display the epoch time given by time() in a human >readable format? Basically, if I do $time = time(); and the insert that >data into my mysql database and then pull that information out again

Re: [PHP] Redirect to a new page?

2003-03-13 Thread Beauford.2002
Figured it out echo ""; echo "window.location.href = 'viewpostats.php'"; echo ""; - Original Message - From: "Leif K-Brooks" <[EMAIL PROTECTED]> To: "Beauford.2002" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, March 13, 2003 2:20 PM Subject: Re: [PHP] Redirect to a new

Re: [PHP] ^M in PHP

2003-03-13 Thread Chris Hewitt
Robert Cummings wrote: I know there's a binary for doing exactly that in linux but I can't for the life of me remember the name. If you're text editor is any good you should be able to do a search and replace for "\r" with "". I use joe, but that's hardly the editor of choice for most. Cheers, Rob

[PHP] Security advice

2003-03-13 Thread rotsky
I'd appreciate some opinions about security & user IDs. My site has a registration process in which people use their email addresses as login names and also have a password. The user database has a user ID field with a unique identifier for each user and this is used as a session variable to iden

Re: [PHP] Redirect to a new page?

2003-03-13 Thread Leif K-Brooks
if(something){ header("Location: {$_SERVER['HTTP_HOST']}/thispage.php"); }else{ header("Location: {$_SERVER['HTTP_HOST']}/thatpage.php"); } Beauford.2002 wrote: Hi, I have searched around for hours on this and nothing seems to work. I want simply to do this if yes - goto thispage.php if no

[PHP] PHP with CGI WRAP

2003-03-13 Thread Charles Kline
Can anyone point me to a good resource on how to run PHP with CGI Wrap? I am hosting a site that is under development at Pair networks and they have their own cgi-wrapper and I need to move this site to another server that probably does not have their own flavor of this. Any help would be appre

Re: [PHP] Redirect to a new page?

2003-03-13 Thread David E.S.V.
btw in your case would be just if/else cheers David. On Thu, 13 Mar 2003, David E.S.V. wrote: > > you can use javascript instead.. > > for example in a jump menu: > > > function seleccionPerfil(form) { > >if (form.perfil.selectedIndex == 0) > >{ > > window.location.hr

  1   2   3   >