[PHP] Re: just wondering
hmm... and... what would you do with a clear screen function on a web page with php ? I can't see how it could work.. :) PHP is server side, so you can't clear the user screen like with C or other language ... Regards, P.E. Baroiller "Artoo" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > Just wondering if there's a clear screen function in PHP like the clrscr() > in 'C'. > > Thanks > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML email with Outlook
Hi, try with adding this : $header = "Content-Type: text/html; charset=\"iso-8859-1\"\nContent-Transfer-Encoding: 8bit\n\n"; If it don't work, try to build multipart email ... Regards, P.E. Baroiller "Tim Thorburn" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > Hi, > > I've made a PHP script that sends out an automatic email through my servers > cron system, it works well, but I thought I'd try to do some HTML email to > get things to line up a little better. > > To do so, I added the following line in my mail() command: -Type: > text/html; charset=iso-8859-1 > > When I check the messages sent out with Eudora, the HTML email comes in > perfectly. However, when I check with Outlook Express 6 - I get the actual > HTML code rather than the nicely formatted email that I had created. > > Should I be using another line in my mail() command? I've recieved HTML > email before with Outlook Express on my machine without changing any > settings at all. Also, I had sent an email from my script to hotmail and > the HTML email worked fine there too. > > Any thoughts? > > Thanks > -Tim > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: How to store a file into MSSQL?
How is defined your temp_test table ? PHP don't truncate content... you only need to define a binary blob field and store data into it.. regard, P.E. Baroiller "Javier" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > Hi everybody, I've trying to store a into a MSSQL Server (7 or 2k) using > an example I found on the web (www.php.net). > > Is it possible that PHP (4.3.2) just store 4k of data? Because after > inserting a test image with: > > $oDatos is an object that handles queries. > > // storing a file > $datastring = join('',file("logo2.jpg")); > $data = unpack("H*hex", $datastring); > $oDatos->query( "insert into temp_test (test) values ( 0x" . $data['hex'] > .")" ); > > A select will return a 4K file. Is it possible? > > $row = $oDatos->getData("select test from temp_test"); > //file://$row = mssql_fetch_assoc($result); > $fp = fopen('copy.jpg','w'); > > > So... is there anyway to store a file that it is larger than 4K? Or am I > missing something? :) > > Thanks. > > -- > *** s2r - public key: (http://leeloo.mine.nu/s2r-gmx.sig) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: value not passed
did you put a before in your script ? What I see in your script is : addDivName is a text input field, without value.. so, if you click on you link, is $addDivName wasn't set before, the content is... empty! :) I can't help you more with your tiny sample :( Regards, P.E. Baroiller "Joaco" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > Can anyone tell me why the addDivName field is always passed as a blank... > This is killing me. > > > > > > > "> > width="58" height="15" alt="" border="0" /> > > > > > Whenever I click on the anchor everything is sent thru except the value of > addDivName? > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Problem with Apache Web Server config file and PHP working together Please help!!
Have you loaded php module into apache ? Have you defined .php files into your httpd.conf ? Try with easyphp on windows... I can't help you more... I hate windows! :D Regards, P.E Baroiller "Karen Santmyer" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > HI: > > I installed Apache Web Server on my laptop which has Windows XP. I then installed PHP. I followed the directions in the book I had on installing apache and php and what to add to the apache configuration file. > > Here is what is happening: After installing everything, I tested my Apache web server installation first and saw the apache web server page like the book said. Then it said to do a little php program - which had phpinfo() in it. But when I retyped the url I got a message that asked me did I want to download a file, which was the php program file. > > The PHP is 4.3.2 and the apache web server is 2.0. What am I doing wrong? Should I use apache 1.3.2? > >Please help. I understand everything, just don't know why it is prompting me to download a file. > >Thanks. > > Karen > > > > - > Do you Yahoo!? > SBC Yahoo! DSL - Now only $29.95 per month! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP & MS Exchange Server problem
Hi... are your sure your Exchanger server has imap enabled and port 143 is open ? If you've got the message "connection refused", it can be : - not imap server is running - your login/password couple is wrong or - you can't connect to the port 143... regards, P.E. Baroiller "Charles Vos" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] Hello All--- I'm having some trouble getting PHP to communicate with my Windows 2000 MS Exchange Server... I'm running PHP 4.3.2 on a Win2000 machine serving with Apache 1.3. The code I'm using is: $mbox = imap_open("{x.x.x.x:143}","admin","adminpass", OP_HALFOPEN); $err = imap_errors(); while (list($key, $val) = each($err)) print imap_utf7_decode($val)."\n"; $alrt = imap_alerts(); while (list($key, $val) = each($alrt)) print imap_utf7_decode($val)."\n"; This yields the error: Warning: imap_open(): Couldn't open stream {x.x.x.x:143} in c:\apache\apache\htdocs\sdimail.php on line 11 Connection refused If I change the imap_open command to use {x.x.x.x:143\} as the host, I get a different error: Warning: imap_open(): Couldn't open stream {x.x.x.x:143\} in c:\apache\apache\htdocs\sdimail.php on line 11 Can't open mailbox {192.168.0.3:143\}: invalid remote specification which makes me suspect that I am actually able to connect but PHP isn't finding anything it likes (what is it looking for?) can anyone help me with this or at least point me towards a tutorial on using PHP with MS Exchange? Thanks in advance for your help, -Charlie [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: include statement giving me hives! - help
Hi, when you call your script, is $point defined somewhere ? if $point is empty, you'll get an empty string for $links_include and include $links_include will not work. Regards, P.E. Baroiller "Dougd" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > I am new to all this, but here is the basic code: > > $link_titles = file('links/master.txt'); > $links_include = $link_titles[$point]; // path to directory > include $links_include; > > If I echo the value of $links_include just prior to the include() function > it contains what I would expect it to contain and the file does exist. But I > get an error: > > Warning: main(./main/links/topsites.php ) [function.main]: failed to create > stream: No such file or directory in . on line 23 > > Warning: main() [function.main]: Failed opening './main/links/topsites.php ' > for inclusion (include_path='.:/usr/local/lib/php') in on line 23 > > If I add the line: > > $links_include = "path to intended include file"; > > just prior to the include statement it works fine. > > Am I missing something? I've tried a variety of renditions of the include() > statement and can't get it to react unless I 'hard code' the value of > $links_include. > > Appreciate your help!! > > -Doug > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: really no way to get byte size of variable?
Hi, did you try count($value) and strlen($value) ? count($value) will give size of an array, and strlen($value) size of a string ... Regards, P.E. Baroiller "Petre Agenbag" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > Hi List > Just want to make sure: > > Is there no way for me to easily determine the byte size occupied by a > variable (regardless of type)? > > It might be trivial, or I'm missing the point (as per usual)... > > I would like to find the actual byte size that is transmitted when say a > $_POST variable is sent, or how much memory a particular variable is taking > up. > > Just want to make sure. Some of the post received so far suggest that "one > character = one byte" etc, but I would love to work with something more > precise if possible, also, is a variable contains a multi-dimensional array, > would that "one character = one byte" formula still return a fair > representation? > > Thanks. > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: outputting a carriage return
Hi, take a look at thedoc... there is a function called nl2br() to convert \n to for html display. regards, P.E. Baroiller "Bob pilly" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > Hi all > Can someone tell me why if i echo a line like this: > > > echo "this is a \n newline"; > the output is: > this is a > newline. > > But if i do this: $text="this is a \n newline"; > echo $text; > the output is: > this is a newline? > > Is there something i have to do to a variable in order for echo or print to treat special chars like '\n' correctly? > > Thanks for any answers in advance! > > > - > Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: fwrite not working in php3
does your file test.inc exists, and... have you perms to write in this directory ? <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > hi there i have a little problem writing files on a php3 server this code > worked yesterday but isnt > > $handle = fopen("/www_tools/apache/htdocs/phptest/temp_real/test.inc",'a'); > $buffer = "test"; > echo fwrite($handle,$buffer,4000); > fclose($handle); > > i get a filesize of 0 and nothing writes to it what could it be ? > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Access Text Field Max Size
Hi, PHP has nothing to do with this , use javascript to limit user entry into your textarea field.. I'll find many sample over the net. Regards, P.E. Baroiller "Johnny Martinez" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > Hi all, > I'm using an Access db as the backend for a little app (I know, I know.) I > just ran into a problem where the user needs to submit a string that is > larger than the max size for text type, 255. > > Does anyone know how to go beyond this limit and stay on the Access db? > Thanks in advance. > > Johnny -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: cookies in asp
If it's a real cookie, you can get it with php into the cookie vars.. If it's an asp session, forget it... "Carlos Castillo" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] HI, I have the following problem, i have a website with php and asp files, in one asp file i create some cookie that i need to access on another php file.do you have any idea.??? Thanks, Carlos A. Castillo. Ingeniero de desarrollo [EMAIL PROTECTED] Su Aliado Efectivo en Internet www.imagine.com.co (57 1)2182064 - (57 1)6163218 Bogotá - Colombia - Soluciones web para Internet e Intranet - Soluciones para redes - Licenciamiento de Software - Asesoría y Soporte Técnico
[PHP] Re: Permission Denied (in FTP)
Hi, Doest your ftp account have sufficient access rights for deleting theses files ? Is your apache user is "nobody" , the chmod will not work ( take a look at your error log file), so, only nobody or root will able to remove these entries.. Regards, P.E. Baroiller "Stephen" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] Hello, I'm having some slight issues. I have a script which creates a directory and then copies a blank file into it 4 times each with different names. Here's the code which does it: After all that is done, it's fine. The problem I'm having is deleting the folder in an FTP client. Whenever I go to delete it, it says it cannot delete desc.txt because permission is denied. Is there any way to make it so it can be deleted? Please help and reply soon. Thanks! Thank you, Stephen Craton Senior Executive Web Developer Mophus.com, Inc. Lead Programmer/Webmaster WiredPHP (http://php.melchior.us) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Trouble getting $HTTP_RAW_POST_DATA
Hi, $HTTP_RAW_POST_DATA is an array... with echo you'll only get "array".. To get something into $HTTP_RAW_POST_DATA, you need to "submit" your form before... Your script will only display something if you post the form before. Regards, P.E. Baroiller "John W. Holmes" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > Balazs Halasy wrote: > > I need to have the contents of $HTTP_RAW_POST_DATA because of > > non-regular uploads (from browser to my home-made WevDAV server implementation > > (done in PHP)). However, no matter what I > > do, it is always NULL. I guess the following script should return > > SOMETHING in $HTTP_RAW_POST DATA if "always_populate_raw_post_data = On" is > > added to the php.ini file (and yes, I've restarted apache :-)... so, why > > is it empty and how can I get the RAW post data? My PHP version is 4.3.2. > > Is register globals ON or OFF? Either way, maybe try > $_SERVER['HTTP_RAW_POST_DATA']... > > -- > ---John Holmes... > > Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ > > PHP|Architect: A magazine for PHP Professionals - www.phparch.com > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Help with parse error
Hi, it's a common error... I think you have an unclosed string before in your script... example : $data='the data; $sDate = date('Y-m-d',time()); this code will produce an error on ligne with $sDate only becose the line with $data is unclosed ( missing the last ' ).. Take a look at your entire script... I'm sure it's this ;) Regards, P.E. Baroiller "James Johnson" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > Hi, > > I'm trying to figure out this error I'm getting in my code: > > Parse error: parse error in /home/.paco/campuscb/AdPayment.php on line 9 > > This is the code on line 9: > > $sDate = date('Y-m-d',time()); > > Does this look valid? > Thanks, > James > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: If else.. display no picture..
May be this line is wrong : Echo Geen informatie beschikbaar; may be use this instead... echo 'Geen informatie beschikbaar'; no? :) regards. <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > Hi, > > I'm trying to do the following.. When $stadpict is filled in it must display the picture (only the path to the picture is stored in Mysql). But when the string ($stadpict) is empty then it must not display the picture (and also not display a box with a red cross in it (can't display picture! ;>). The only thing i'm getting is an error message... > > Parse error: parse error, unexpected T_STRING, expecting ',' or ';' > > Code; > // includes > include("../conf/config.php"); > > // open database connection > $connection = mysql_connect($host, $user, $pass) or die ("Unable to connect!"); > > // select database > mysql_select_db($db) or die ("Unable to select database!"); > $stedenid=$_GET['stedenid']; > > // generate and execute query > $query2 = "SELECT stedenid, naamstad, stadomschrijvk, stadpict FROM steden WHERE stedenid = $stedenid"; > $result2 = mysql_query($query2) or die ("Error in query: $query2. " . mysql_error()); > $row2 = mysql_fetch_object($result2); > if (mysql_num_rows($result2) > 0) > { > ?> > > naamstad; ?> > stadpict; > ?> > > > > > > > > while($row->$stadpict > 0) > { > ?> > > } > ?> > stadomschrijvk; > } > else > > { > Echo Geen informatie beschikbaar; > } > ?> > > > Thanks for helping me out! > > Frank > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: mysql - get actual row
Hy, try with mysql_insert_id() [ if you've set the first field as "index" in your table ]. Regards. "Harry.De" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > Hi, > if i insert into a mysql table a row e.g. >mysql_query("INSERT into TEST (testfield) VALUES ('This is a test')"); > and the first field is an auto increment (e.g. NR), > how can i get the value of the auto increment NR i've actually inserted? > > Tanks Harry > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: can't call htpasswd using PHP
Does you php or apache process have perms to do this? "Billy" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > Dear all, > > i can't call the "htpasswd" command after i used RedHat 8 ( which i can do > so in Red Hat 7.2) > > do u have any idea/ suggestion? > > thx a lot > HPS > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in f:\.....\none.php on line 286
Hi... You've made a bad query and there is no result... mysql_fetch_row($result) => if no data found, you've got an error... "Marcelo Luiz De Laia" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > What this message means? > > What it is the error? > > Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result > resource in f:\.\none.php on line 286 > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.488 / Virus Database: 287 - Release Date: 5/6/2003 > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] test
only to see if i can post messages -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] File upload and php... not a beginner question...
Hi, everyone know how to upload files from the browser to your web server using multipart-form method with move_downloaded_file() php function. But... It's a slow method for multiple files & huge files transfert. I'm currently working on a big photo album tool, and I want to provide user the ability to upload a lot of jpeg files in one time... The big problem with form is it's too slow... Does anyone know how to by-pass this ( with java or other tools )? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] file upload and php (Not a begginer question!)
Hi, everyone know how to upload files from the browser to your web server using multipart-form method with move_downloaded_file() php function. But... It's a slow method for multiple files & huge files transfert. I'm currently working on a big photo album tool, and I want to provide user the ability to upload a lot of jpeg files in one time... The big problem with form is it's too slow... Does anyone know how to by-pass this ( with java or other tools )? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Creating a voting system.
take a look on php website, there is a lot of scripts for this : http://www.hotscripts.com & others. Regards. P.E. "Thomas Goeminne" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > Hello, > > I am making a page where people can vote for their favourite image. People > can give points from 1 to 5. I want the votes counted in a table in my mysql > dbbase called votes. How do I make such a system? > > thank you for helpfull hints. > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: class variable shared by all objects
You can use this function : get_object_vars to retreive vars from a class.. Here is the example from phpdoc : x = $x; $this->y = $y; } function setName($name) { $this->name = $name; } function ReadPoint() { return array("x" -> $this->x, "y" -> $this->y, "name" -> $this->name); } } $p1 = new Point2D(1.233, 3.445); print_r(get_object_vars($p1)); // "$nom" is declard but undefined // Array // ( // [x] -> 1.233 // [y] -> 3.445 // ) $p1->setName("point #1"); print_r(get_object_vars($p1)); // Array // ( // [x] -> 1.233 // [y] -> 3.445 // [name] -> point #1 // ) ?>"Christophe Barbe" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > I guess the answer is obvious but can't find it in the manual. > > Is it possible to have a variable in a class that is shared by all > instances. I thought 'static' would do it but apparently not. > > Christophe > > -- > Christophe Barbé <[EMAIL PROTECTED]> > GnuPG FingerPrint: E0F6 FADF 2A5C F072 6AF8 F67A 8F45 2F1E D72C B41E > > Dogs believe they are human. Cats believe they are God. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Best way to store Votes for Survey app
Hi, Your solution is a good way (I use the same system for user contributions vote).. The size of the DB is not a problem... You can add an history table if you work month by month. Like this, your 'voting' table will only have current month value, and the history table will get results for each month.. No? Regards, P.E. Baroiller "Monty" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > I'm writing a survey app in PHP (4.2.2) that will allow people to view a set > of photos and then rate each photo from 1-5 using a little dropdown under > each photo. When they are done choosing their ratings, they click on SUBMIT > to register all their votes at once. > > I thought the best way to record votes was to create a record for each > member and each photo they voted on in MySQL. So, for example, if someone > rates 9 photos, there will be 9 records created in the voting DB structured > something like this: > > item_id // ID number of the photo being rated. > member_id // ID of the member making the vote. > date// Date vote made. > rating // 1-5 > > While this system offers a lot of flexibility in calculating votes, I'm > worried that the DB will become full fast with records because of the number > of records created for each member when they vote. If there are 10 photos > and 2,000 people rate those photos, that will create 20,000 new records in > the DB for that one poll alone. > > So, I'm wondering if anyone has any suggestions for better ways to store > votes like this without created so many DB records. I want to be able to > calculate total votes for each photo as well as prevent members that have > already voted from voting again. > > Any suggestions would be appreciated! > > Monty > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] You to prevent site hacking by 'pirates' ?
Hi everyone.. I would know what did you think of my method to prevent 'piracy'.. I do like this : - A Session is made for each user In the session, put 2 value : a flag "userlogged" and the userId - In a cookie, I put the session Id and an unique crypted value. When user go on private parts of the site, I check the session, the cookie and database fields for the user.. The crypted data contains some user values (the encryption is done with mcrypt lib). Is it a good way or is there a better way (without SSL)... ? Regards, P.E. Baroiller -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] You to prevent site hacking by 'pirates' ?
I work with double cookie to add a "security"... If the user try to change de sessionId, I check with the current sessionId stored into my own cookie.. But.. It may not to be usefull... :) The cookie is basically a crypted copy of the session content (with a different encryption method). I'm looking for a good way to protect a private part of a site and... I was thinking this method would be more efficient than only the session cookie.. But ... perhaps I'm on the bad way... "John W. Holmes" <[EMAIL PROTECTED]> a écrit dans le message de news: 002501c27e08$40567040$[EMAIL PROTECTED] > > I would know what did you think of my method to prevent 'piracy'.. > > > > I do like this : > > > > - A Session is made for each user > > In the session, put 2 value : a flag "userlogged" and the userId > > - In a cookie, I put the session Id and an unique crypted value. > > If you're using sessions, there is already a cookie with the session id > in it. Why are you storing crypted values in a cookie? Why not just add > the values to the session and not worry about encrypting it? > > ---John Holmes > > > > > When user go on private parts of the site, > > I check the session, the cookie and database fields for the user.. > > The crypted data contains some user values (the encryption is done > with > > mcrypt lib). > > > > Is it a good way or is there a better way (without SSL)... ? > > > > Regards, > > P.E. Baroiller > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: What is this??
You only have a difference into your insert query like this : insert into table (x,y,z) values(x,y) .. "Miguel BráS" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > Hi guys, > > I was doing a script to insert data on a table, and the following message > appeared me when testing the form for data insertion: > Column count doesn't match value count at row 1 > > I lsaw the PHP manual and some other resources that I have, but couldn't > find anything about it... > > Any hint from someone?? > > Cheers > Miguel > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] find html links..
Hi... I'm looking for a preg_match regular expression to find all href tags into a text field... can someone help me?? I've tried a lot of regexp but... nothing work correctly... I can't get all matching href ( such as or < a href="xx"> , ... ) any idea? cheers.. P.E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Need help...
Hi everyone... I've got a little problem : I've got an html template, with javasript functions and stylesheets in many places... This html template is made via a big big template handler i've done... All seems to work... But, now, I would like to clean this html page to procude a 'readable' page If got a page like this : xyxyxyxyxyx function nb1() {} y yy .outter {} And.. I would like to produce a page like this : .outter {} function nb1() {} xyxyxyxyxyx y yy Anyone have and idea ? I've tried with some preg_match_all() but... The only that work for me is '/]*>(.*)<\/head[^>]*>/si' witch returns the head content... (where I'll add style & script contents).. I've tried to change 'head' with 'script' or 'style' but.. It doesn't work... Like I'm not a regex guru ...I'm looking for help.. Regards, P.E. Baroiller -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Need help...
Like noone seems to find something usefull to help me.. I've done the work myself :) I've tried this : $eregstr="/]*>([^<]|<[^\/]|<\/[^style]|<\/style[^>])*<\/style[^>]*> /msi"; $data=preg_match_all($eregstr,$str,$matches); $str=preg_replace($eregstr,"",$str); $styles=implode("\n",$matches[0]); $eregstr="/]*>(.*)<\/head[^>]*>/si"; $str=preg_replace($eregstr,"\\1".$styles."",$str); And, actually, it works fine.. Any other solution ? ( faster...??) "Baroiller Pierre-Emmanuel" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > Hi everyone... > > I've got a little problem : > > I've got an html template, with javasript functions and stylesheets in many > places... > This html template is made via a big big template handler i've done... > All seems to work... But, now, I would like to clean this html page to > procude a 'readable' page > If got a page like this : > > > > > xyxyxyxyxyx > > function nb1() {} > > y > yy > > .outter {} > > > > > And.. I would like to produce a page like this : > > > > > .outter {} > > > function nb1() {} > > > > xyxyxyxyxyx > y > yy > > > > > Anyone have and idea ? > I've tried with some preg_match_all() but... The only that work for me is > '/]*>(.*)<\/head[^>]*>/si' witch returns the head content... (where > I'll add style & script contents).. > I've tried to change 'head' with 'script' or 'style' but.. It doesn't > work... > Like I'm not a regex guru ...I'm looking for help.. > > > Regards, > P.E. Baroiller > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Need help...
Received fro Yves le duaron : Try this for example ; "'<".$pattern."([^>]*)?(\/)?>(?(2)|(.*)?<\/".$pattern.">)'siU" Please notice the U (ungreedy) to enhance the speed. This also match empty tags ... Sorry I have no login to send this to the mailing list, do this for me please ! "Baroiller Pierre-Emmanuel" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > Hi everyone... > > I've got a little problem : > > I've got an html template, with javasript functions and stylesheets in many > places... > This html template is made via a big big template handler i've done... > All seems to work... But, now, I would like to clean this html page to > procude a 'readable' page > If got a page like this : > > > > > xyxyxyxyxyx > > function nb1() {} > > y > yy > > .outter {} > > > > > And.. I would like to produce a page like this : > > > > > .outter {} > > > function nb1() {} > > > > xyxyxyxyxyx > y > yy > > > > > Anyone have and idea ? > I've tried with some preg_match_all() but... The only that work for me is > '/]*>(.*)<\/head[^>]*>/si' witch returns the head content... (where > I'll add style & script contents).. > I've tried to change 'head' with 'script' or 'style' but.. It doesn't > work... > Like I'm not a regex guru ...I'm looking for help.. > > > Regards, > P.E. Baroiller > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: strange echo() effect
You've forgotten the "" in your echo... html_header() and html_footer() put html in the right place in your page but, like you haven't close your tag, the footer dans be everywhere in your page (depends on the web browser you're using).. Regards, P.E. Baroiller I have a small piece of code which does the following: 1) call a function to print an html header, 2) query a database to list the users in the db, 3) print an html footer. problem is it print out the footer before the table, even though it is called after. looking at the html source of the page in a browser, show that the table is first, why is this happening? here is the code: html_header(); echo "\n"; echo "\n"; echo "uid\n"; echo "username\n"; echo "password\n"; echo "session id\n"; echo "email address\n"; echo "\n"; $query = "SELECT * FROM users LIMIT 0,30"; $result = mysql_query($query); while ($query_data = mysql_fetch_row($result)) { echo "\n"; foreach ($query_data As $column) { echo "\t$column\n"; } echo "\n"; } echo "\n"; html_footer(); -- Mat Harris OpenGPG Public Key ID: C37D57D9 [EMAIL PROTECTED] matthewh.genestate.com "Mat Harris" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Convert GIF to JPG with or without GD
Hi all, does anyone know a way to convert a gif file to jpg ? I've made a photo album and, want to resize pictures to create thumbnails.. GD allow resizing jpeg files, but not gif files... So... how can I create a jpeg file from the gif source ? (may be with an external software...) ??? Cheers P.E. Baroiller -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Convert GIF to JPG with or without GD
thanks for all! :) I'll take a look at this product. P.E. Baroiller "Krzysztof Dziekiewicz" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > > does anyone know a way to convert a gif file to jpg ? > > I've made a photo album and, want to resize pictures to create thumbnails.. > > GD allow resizing jpeg files, but not gif files... > > So... how can I create a jpeg file from the gif source ? > > (may be with an external software...) ??? > > Command 'convert' from packet Image Magic (Linux) > > It is problem with GD: "Since all GIF support was removed from the GD library in > version 1.6, this function is not available if you are using that version of the > GD library." > > > > > -- > Krzysztof Dziekiewicz > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] regular expression and exact word search...
Hi! does someone know how to find an exact word in a content with html tags ? I'm using a regexp like this : $searchRegEx = "'\b".$word_search."\b'msi"; to get boundary word results, but... if the searched word is like 'word or word. or anything else, the regular expression doesn't work.. if I remove the \b , I've got all words ( but without bound...) Any idea? (the big problem is I'm higlighting found sentences, and .. if the searched word is part of an html tag, it's very auwfull... ) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] regular expression and exact word search...
I work with preg_match_all to get all matching words and preg_replace_callback to replace found sentences... before runing the php pass, I take results from a mysql table with a query like this : select * from mytable where content REGEXP '[[:<:]]theword[[:>:]] But... I can't get all entry where words is in... ".: B I G D O G :." <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > Which functions are you using to do the regex stuff... > > That might help...also check out... > > > > On Thu, 2002-11-07 at 15:42, BAROILLER Pierre-Emmanuel wrote: > > Hi! > > > > does someone know how to find an exact word in a content with html tags ? > > I'm using a regexp like this : > > > > $searchRegEx = "'\b".$word_search."\b'msi"; > > > > to get boundary word results, but... if the searched word is like 'word or > > word. or anything else, the > > regular expression doesn't work.. > > > > if I remove the \b , I've got all words ( but without bound...) > > > > Any idea? > > (the big problem is I'm higlighting found sentences, and .. if the searched > > word is part of an html tag, it's very auwfull... ) > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > -- > .: B i g D o g :. > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Convert GIF to JPG with or without GD
Yes... I've tried Image Magic , it's good for my work :) Now, I can resize/resample/reformat any kind of picture... thanks for all! :) "Krzysztof Dziekiewicz" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > > The GD library bundled with PHP 4.3 can read gif images (but not write them) > > And imagejpeg allows to create the jpeg file. > > > > -- > Krzysztof Dziekiewicz > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTTP POST FILE UPLOAD HELP
Hi, how did you make for html form to upload files ? you need to add an encryption like this to post files... If you make a simple post form, you'll never get the posted files! :) File uploading works with php3 & php4 and it's very easy to implement. cheers. P.E. Baroiller "@ Darwin" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > Nope, tried that just now. The example doesn't work for me. Any other > suggestions? > > - Darwin > > > -Original Message- > > From: Justin French [mailto:justin@;indent.com.au] > > Sent: Friday, November 08, 2002 7:13 AM > > To: @ Darwin; Php-General > > Subject: Re: [PHP] HTTP POST FILE UPLOAD HELP > > > > > > Hi, > > > > Simple question first: There is a perfect working example of file uploads > > available on the PHP website in the manual. Can you get that example to > > work? > > > > Justin > > > > > > on 08/11/02 10:05 PM, @ Darwin ([EMAIL PROTECTED]) wrote: > > > > > > > > Ok, I have a problem with my file upload. When I upload a file, > > say $img, > > > only $img is available and when I echo $img to the screen it > > gives the full > > > path of the temporary image "supposedly" created by PHP. Echoing > > > $_FILE['img']['tmp_name'], or any of the other $_FILE array elements, > > > doesn't give anything. There is no array of information for the uploaded > > > file, possibly because of the following problem I'm having: > > > > > > Another weird thing is that no temporary file is even created > > on the server > > > (I did a system search on the C: drive of the windows box I'm > > using). Here > > > is the info from my php.ini file: > > > > > > > > -- > > -- > > > --- > > > > > > > > > ; File Uploads ; > > > > > > > > > ; Whether to allow HTTP file uploads. > > > file_uploads = On > > > > > > ; Temporary directory for HTTP uploaded files (will use system > > default if > > > not > > > ; specified). > > > upload_tmp_dir = C:\PHP\tmp_uploads > > > > > > ; Maximum allowed size for uploaded files. > > > upload_max_filesize = 6M > > > > > > > > -- > > -- > > > > > > > > > I even changed the upload_tmp_dir setting to the default and it > > still didn't > > > create a temporary file of the image on the server. GD is definately > > > installed and enabled according to phpinfo() -- although GD has > > nothing to > > > do with this. I'm uploading *.jpg/*.jpeg files only. > > register_globals is on > > > (I am aware of the risks). So what could be wrong? Is there > > another setting > > > in the php.ini file that I need to worry about that is not set > > by default? > > > I've pondered and tested this long enough and I'm beyond frustration, > > > someone please help me with some suggestions to get me through this... > > > > > > Thanks, > > > - Darwin > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: wanted: array_diff for more than values
array_diff check value, not keys.. "Nick Eby" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > example: > $arr1 = array("color" => "red", "flavor" => "cherry"); > $arr2 = array("color" => "cherry", "flavor" => "red"); > print_r(array_diff($arr1, $arr2)); > > those 2 arrays are different, but array_diff doesn't know it since it > doesn't compare values at particular keys, just values in general. i want a > function that knows that those 2 arrays are different; that the values for > both color and flavor changed, and gives me back an array that looks exactly > like $arr2. although it would take about five minutes to write such a > function, i'm wondering, does one already exist and i just can't find it in > the manual? thanks > /nick > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: big include
If you have a lot of code to process, it may be longer but, if it's a class include, it's very fast to load .. I've got classes about 60Kb, and the average for processing a page (from loading to the html output) is less than 5ms... "Khalid El-Kary" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > hi, > I wanted to ask about if big include files affect the speed of the script ? > > Normally, it should, but i heared that PHP stores the parsed result of > scripts in memory since the first run for next usage, is that true? and if > not, does parsing 21 KB very time, really affects the speed? > > thanx > khalid > > > > > > _ > MSN 8 with e-mail virus protection service: 2 months FREE* > http://join.msn.com/?page=features/virus > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: how can I unsubscribe from this
go to php.net and unsubsbribe this mailing list :) "Joe Reichmuth" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: registering object in session - Object to string notice error?
To this : session_register('somevar') and it'll work.. if your're using PHP4, you can also do this : $_SESSIONS['somevar']=$somevar Regards, P.E. Baroiller "Paul" <[EMAIL PROTECTED]> a écrit dans le message de news: 002601c28743$42bebbf0$[EMAIL PROTECTED] > > I have a simple object/class: > > Class MainData { > Var items =array(); > > ...some other functions but nothing to initialize it > } > > in a code when I do : > > $somevar= new MainData(); > session_register($somevar); > > I get "notice" type of error: > Notice: Object to string conversion in C...\page_vip.php on line 27 > > How can I avoid this? It does not stop code and it is not a fatal error > but perhaps I am missing something > > Paul > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general@lists.php.net
Hi ! Could you write it in english please ? "Rich" <[EMAIL PROTECTED]> a ecrit dans le message de news: [EMAIL PROTECTED] > PHP$B=i?4 $B$*CN7C$rGR > $BNc$($P!"(Bhttp://www.mydomain.com$B$G%;%C%7%g%s$r3+;O$7!"$=$N8e!"(B > https://www.mydomain.com/regist.htm$B$X0\F0$7$?$H$-$K!"%;%C%7%g%s$O7QB3$5(B > $B$l$k$N$G$7$g$&$+!)(B > > $BJL%5!<%P!<$X0\F0$9$k$H%;%C%7%g%s$O=*N;$9$k$HJ9$-$^$7$?!#%I%a%$%sItJ,$,F1(B > $B$8$G$b(Bhttps://$B$K$J$k$3$H$G!"JL%I%a%$%s$H$7$FG'<1$5$l$k$N$G$O$J$$$+$H?4G[(B > $B$7$F$$$^$9!#$^$@(BSSL Cert$B$rGc$C$F$$$J$$$N$G!"%F%9%H$G$-$J$$$N$G$9!#(B > > $B$h$m$7$/$*4j$$CW$7$^$9!#(B > > $B:d!!N<2p(B > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Rotating Ads
The fastest way to do this is very simple : store the last Id of your banner , get another from your SQL table (with rand) and display it (repeat if the Id is the same).. And, in your html page, add a refresh=xx to refresh the ad page. Regards, P.E. Baroiller "Stephen" <[EMAIL PROTECTED]> a écrit dans le message de news: 001901c28827$d69d72a0$[EMAIL PROTECTED] I have a link exchange script and I need to rotate the ads each time a page refreshes. How exactly can I do this? I have an id field for each ad. How could I display a different ad each time the page refreshes using the id field? Thanks, Stephen Craton http://www.melchior.us "Life is a gift from God. Wasting it is like destroying a gift you got from the person you love most." -- http://www.melchior.us -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: How to know files in a directory
use opendir() , and readdir().. you'll get a var like $file, then check is_file($file) to see if it's a file :) (take a look at the php doc.) "Mohd_q" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] I wonder if there is a way to get the files names in a given directory. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Sotre image created by GD in db
Hi, you can do something like this : $imgdata = addslashes(imagejpeg($imnew)); // For JPG file. $query="INSERT INTO your_table (data) value ('$imgdata')"; $result = @mysql_query($query); I haven't try but it may work... Regards. P.E. Baroiller "Mohammadreza Hassanrezaeian" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > Dear Guys, > I want to store an image created by GD functions to a field of my DB. I can > not save it to a string to save it to blob field. Can any one help me with a > simple sample code? > Regards, > Mohammad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Multiple image buttons
Hi, I don't understand what you really want to do... what do you mean by "image button" ? an or ?? On my opinion, you don't need php to check what button is pressed... All this can be done with a simple javascript function ... or with tag. After this, send a value to your phpscript like "pressed=xx" where xx is the named button pressed. Regards, P.E. Baroiller "Hardik Doshi" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > Hi Group, > > I have a page on which there are multiple image > buttons. Is there any way to determine which button is > pressed by the user? > > For example, there is a page on which i display all > the users of the system with the edit and delete > button beside each user entry. Now if admin wants to > delete one of the users then how can i know admin > pressed which button? It is possible with non-image > button but image button always give me x and y > co-ordinates. > > Please let me know if you have any clue. > > Thanks > > > __ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Help understanding code...
Hi, It's a "C Like Syntax" (condition)?true:false; is like : if (condition) true else false regards. P.E. Baroiller "Jeff McKeon" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] I've just picked up a more advanced book on PHP and it has a lot of example code in it. I understand most of it but some things I'm seeing I don't understand. Like the following... code: $couponcode = (! empty($_REQUEST['couponcode'])) ? $_REQUEST['couponcode'] : NULL; I think this is saying: If the global variable couponcode is not empty, then the variable '$couponcode' is equal to "$_REQUEST['couponcode']" otherwise it gets a "NULL" value. What's throwing me is the use of the "!" and "?" and ":" If What I suspect is correct, I've never seen an if-then statement like this. If it is a replacement for an IF-Then statement then it's much cleaner and I'd like to use it. another one is: code: IF (!strcmp($operator, '+')) { $result = $num1 + $num2 } I've looked up strcmp() and know it's used to compair two strings. The $operator variable in the script that this was taken from is set to either "-", "+", "*" or "/". What I don't understand here is what the "!" in front of strcmp() means. Can anyone break down the code for me and explain the parts? thanks, Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php