Re: [PHP] Excel to MySQL
I use to save my access data to a dbf file and then use the dbf2mysql (see www.mysql.com site). dbf2mysql will create proper tables and export data to the mysql really faster than odbc. Very easy. I have exported someting like 5.000.000 records into 8 differents tables in 4 hours (3 cdroms of access data, 1 cd of dbf data :) And no need to create the table into mysql (this could be long if the table is big). Byez "Daniel Harik" <[EMAIL PROTECTED]> ha scritto nel messaggio [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Guys getting more serious here now, 3 500 000 records, foxPro > > i'll try Jeff's method > -- 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] Re: Destroying Session Prob
Try a more simple: "); ?> "Joe Van Meer" <[EMAIL PROTECTED]> ha scritto nel messaggio [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... >Hi again, I've just completed my logout process, everything is going > great but after I log out (logout.php has session_start() followed by > session_destroy(). ) > I get two weird symbols printing out. One is like a box and the a "B". My > code is below. > > > > session_destroy(); > print "You are now logged off." & "" > ?> > > > Any ideas why I'm getting these 2 symbols printing out? > > Thx Joe :) > > -- 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] Re: $QUERY_STRING
Try getenv() function to import the query string from apache ambient. This is not a bug, maybe the index.php?1 isn't standard at all. "Ernesto" <[EMAIL PROTECTED]> ha scritto nel messaggio [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Hi, > > I'm a newbie using Apache 1.3.22 and PHP 4.0.6 on Windows. > I'm trying to access the $QUERY_STRING var, but it's empty even when I > do have a query string. On one server (Win2K), it works ok. On the other > server (WinXP) it's always empty. > If I use "index.php?s=1", $HTTP_GET_VARS['s'] is 1, but I need the raw > query string because it's something like "index.php?1". > > Is this a known bug on PHP/WinXP? > > Regards, > Ernesto > -- 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] Re: Checkboxes / Undefined Variables
define it :-)) boolean name_of_chechbox_3; for example J <[EMAIL PROTECTED]> ha scritto nel messaggio news:[EMAIL PROTECTED] .net... > In am HTML form, checkboxes NOT checked are not passed > to the PHP script called by the form. > > Therefore, if $name_of_chechbox_3 is not passed but it's > used in the PHP script, it results in "Warning: > Undefined Variable". > > How can I avoid this? > > Thanks! > > A. F. Rodriguez > ([EMAIL PROTECTED]) -- 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] Re: Frames and Sessions
I agree :-)) J "Jimmy Elab" <[EMAIL PROTECTED]> ha scritto nel messaggio [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Michael Hall wrote: > > can't figure out how I'm going to maintain a session across the three > > seperate HTML files in the frameset. > > You don't! PHP and your browser will do it for you. It doesn't matter > whether you're in frames or not. All that matters is the cookie that is > automagically generated by the session manager and is sent to the server > on each request. > > You only need a call to session_start() in each file that relies on the > session variables, and a session.register('varname') for each var once > you've decided you want it being saved accross pages. -- 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] Re: can php detect whether an email address is a valid one?
You can do it like: 1) Have php send the email with a particulare return reply so that wrong email addresses get sent back to it 2) Configure procmail to launch a php script when an email is received on that account (the "return" one) 3) Write the php script (SCRIPT NOT WEB) to parse the email reiceved and delete the email-address from database. What I did once was to: Write an email (mime format, with colors and images) to many persons with "Hello $customer_name". But the system had to be controlled by the business boss :) So he could write an email to a "bot", and the "bot" converted all the $some_thing into text taken from database. It's much similar than what it looks... Ju "Alex Chau" <[EMAIL PROTECTED]> ha scritto nel messaggio [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have a php script sending newsletter to a mailing list time by time, > but some emails are no longer exist, so I need to remove them manually. > Can php detect whether an email address is a valid one, then remove it > from the list automatically? no matter before or after the newsletter > has sent. > > Thanks in advance. > > -- 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] Re: Function Call Line Number
Well, I don't know either but I was thinking about that... Usually this "$lineno = __LINE__" would be avaluated when the function is called, this mean it gives the __LINE__ of the function call itself. Why don't you try a more simple "include"/require instead of calling a funcion ?(see example) but maybe it will return the value "LINE 1" in the included file... I don't know... that is: ...code... include("line.php"); ...code... line.php echo(__LINE__); "Jason G." <[EMAIL PROTECTED]> ha scritto nel messaggio [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello, > > Does anyone know of a way, that from within a function, you can determine > what line number and file the function was called on? > > I did try: > function myfunc($lineno = __LINE__) > { > echo $lineno; > } > but this just outputted the very line that __LINE__ resides on. > > This would be very helpful in displaying sensible error messages, like the > native php functions do. > > Thanks, > > -Jason Garber > IonZoft.com > -- 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] Re: Function Call Line Number
Another thing... if the $lineno variable isn't defined yet, maybe the parser first try a cast into __LINE__ type, so even if the assign procedure is called at the function call, the line is evaluated at the funcion definition step... but maybe it's a bullship :-) J "Dav" <[EMAIL PROTECTED]> ha scritto nel messaggio [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Well, I don't know either but I was thinking about that... > Usually this "$lineno = __LINE__" would be avaluated when the function is > called, this mean it gives the __LINE__ of the function call itself. > Why don't you try a more simple "include"/require instead of calling a > funcion ?(see example) > but maybe it will return the value "LINE 1" in the included file... I don't > know... > > that is: > > ...code... > include("line.php"); > ...code... > > line.php > > echo(__LINE__); > "Jason G." <[EMAIL PROTECTED]> ha scritto nel messaggio > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Hello, > > > > Does anyone know of a way, that from within a function, you can determine > > what line number and file the function was called on? > > > > I did try: > > function myfunc($lineno = __LINE__) > > { > > echo $lineno; > > } > > but this just outputted the very line that __LINE__ resides on. > > > > This would be very helpful in displaying sensible error messages, like the > > native php functions do. > > > > Thanks, > > > > -Jason Garber > > IonZoft.com > > > > -- 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] Re: using sessions and include
session name in the display_image appears to be different from the name specified in the index "Jtjohnston" <[EMAIL PROTECTED]> ha scritto nel messaggio [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Martin, are ya out there? Does anyone know anything about sessions? (An > post & reply would be handy :) > > I am using session_register. I have: > > http://www.collegesherbrooke.qc.ca/languesmodernes/postcard/index.html > http://www.collegesherbrooke.qc.ca/languesmodernes/postcard/index.html.phps > > Which submits to: > > http://www.collegesherbrooke.qc.ca/languesmodernes/postcard/postcard.php > > http://www.collegesherbrooke.qc.ca/languesmodernes/postcard/postcard.phps > > postcard.php is supposed to pass data to display_image.php > > http://www.collegesherbrooke.qc.ca/languesmodernes/postcard/display_image.ph p > > http://www.collegesherbrooke.qc.ca/languesmodernes/postcard/display_image.ph ps > > The problem is that display_image.php loses my data coming from > index.html > > }else{ > include "display_image.php"; > } > > But when I try to debug and remove the \\ on lines 3 & 4 > > //include("display_image.php"); > //exit; > > display_image.php will display my data correctly from index.html > > Can anyone help? What am I doing wrong? > > John > > -- 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] Re: Multiple .ini-files for PHP
You can pass different ini stuff in the htaccess file for each virtual host "Stefan" <[EMAIL PROTECTED]> ha scritto nel messaggio 002a01c16ce4$bf6bc960$3c01a8c0@quasimodo">news:002a01c16ce4$bf6bc960$3c01a8c0@quasimodo... Is there a way to have different .ini-files for each VirtualHost? Apache is used as webserver Thank you for helping Stefan Rusterholz, [EMAIL PROTECTED] -- interaktion gmbh Stefan Rusterholz Zürichbergstrasse 17 8032 Zürich -- T. +41 1 253 19 55 F. +41 1 253 19 56 W3 www.interaktion.ch -- -- 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] Re: Multiple .ini-files for PHP
>From www.php.net searching "htaccess" in the "online documentation": When using PHP as an Apache module, it is possible to override PHP ini setting per Virtual Host in httpd.conf or per directory with .htaccess. Refer to the Configuration section and Apache Manual for details. "Stefan" <[EMAIL PROTECTED]> ha scritto nel messaggio 002a01c16ce4$bf6bc960$3c01a8c0@quasimodo">news:002a01c16ce4$bf6bc960$3c01a8c0@quasimodo... Is there a way to have different .ini-files for each VirtualHost? Apache is used as webserver Thank you for helping Stefan Rusterholz, [EMAIL PROTECTED] -- interaktion gmbh Stefan Rusterholz Zürichbergstrasse 17 8032 Zürich -- T. +41 1 253 19 55 F. +41 1 253 19 56 W3 www.interaktion.ch -- -- 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] Re: array_unique() workaround?
You can: 1) make a "while" cycle 2) pop the value 3) use the in_array to check if the value is in the array (pop means "extract" not only "get") 4) if in_array function returns true "push" the value in a new array J "Spunk S. Spunk III" <[EMAIL PROTECTED]> ha scritto nel messaggio [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I'm working on a script that needs array_unique() but my host is using 4.0.4 > and it's broken in that build. Does anyone have a good workaround for this? > I can wait for my host to upgrade but if I release this code, it would be > better to have the workaround... > > I just need a good way to check for dups in an array and remove them. I > can't get my brain around it... > > TIA > Spunk > -- 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] Re: VALUABLE LESSON: using sessions and include
What you can do is not to name session at all :-) It's easyer :-) J "Jtjohnston" <[EMAIL PROTECTED]> ha scritto nel messaggio [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Thanks Dav, > > You caught me while I was debugging. But I learned a valuable lesson! I indeed > did not name my session_name correctly. IN FACT ... I did not name it AT ALL in > display_image.php. There lay the problem. I needed to declare both: > > session_name("ESLpostcard"); > session_start(); > > at the beginning of display_image.php AND postcard.php for the data to > re-transmit itself. > > I was running both php files without session_name and session_start. The docs > just don't make that clear enough that you need to re-include session_name. > > Duh, uh, ... the session ID stayed the same, so I figured the data was > getting through even if I didn't see it. Indeed, postcard.php was receiving the > data - we can see that in the form - but was not transmitting the data as well, > only if I included display_image.php > > > > http://www.collegesherbrooke.qc.ca/languesmodernes/postcard/index.html > > http://www.collegesherbrooke.qc.ca/languesmodernes/postcard/index.html.phps > > http://www.collegesherbrooke.qc.ca/languesmodernes/postcard/postcard.php > > http://www.collegesherbrooke.qc.ca/languesmodernes/postcard/postcard.phps > > http://www.collegesherbrooke.qc.ca/languesmodernes/postcard/display_image.ph p > > http://www.collegesherbrooke.qc.ca/languesmodernes/postcard/display_image.ph ps > -- 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] Re: Array problrem!
It seems you data are down-taken to Integers (int) instead of the correct variable type. Try to define the array as an array of correct types, otherwise the array will be "int type" and will contain integers (1.2 taken to 1, 0,5 taken to 0, and so on) J "De Necker Henri" <[EMAIL PROTECTED]> ha scritto nel messaggio 3A8ED7A62794D311AA7700508B6164EC08DCA38A@SCPTS01">news:3A8ED7A62794D311AA7700508B6164EC08DCA38A@SCPTS01... > Hi there. > I have an array like this : 1.2 , 0.3 , 0.5 , 1.6 , 0.3 > I output like this: > > while($data_array[$j]){ > echo "$data[$j]" ; > $j++ ; > } > > My output is like this : 1 , 0 , 0 , 1 , 0 > The values in the db are floats and are read correctly ! > > Why is the values not there.Is there a specific way to store values in a > array? -- 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]
Re: [PHP] array_unique() workaround? SOLUTION!
Well infact you are checking equity, like my suggestion about in_array :-) "Spunk S. Spunk III" <[EMAIL PROTECTED]> ha scritto nel messaggio [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Thanks everyone for the ideas, > Here's what I came up with... > I forgot to mention that I needed to preserve the original array's keys. > Here is a replacement I wrote that seems to work. Let me know if you see > errors in it or have improvements. > > function my_array_unique($somearray) > { > asort($somearray); > reset($somearray); > $currentarrayvar = current($somearray); > foreach ($somearray as $key=>$var) > { > if (next($somearray) != $currentarrayvar) > { > $uniquearray[$key] = $currentarrayvar; > $currentarrayvar = current($somearray); > } > } > reset($uniquearray); > return $uniquearray; > } > > > > > > I'm working on a script that needs array_unique() but my host is using 4.0.4 > > and it's broken in that build. Does anyone have a good workaround for this? > > I can wait for my host to upgrade but if I release this code, it would be > > better to have the workaround... > > > > I just need a good way to check for dups in an array and remove them. I > > can't get my brain around it... > > > > TIA > > Spunk > > > > > > -- > > 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 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] DOM - Question about \0
Hi, I have question about \0 character with DOM : formatOutput = true; $container = $dom->createElement('root'); $blob = $dom->createElement('blob'); $blob->appendChild($dom->createCDATASection($cdata)); $container->appendChild($blob); $dom->appendChild($container); echo '' . htmlentities($dom->saveXML()); /* Result : */ ?> What to do with the character \0 ? encode this character to obtain : ? or skip the character with str_replace("\0", '', $cdata) ? What is the best thing to do ? i like to conserve the \0 because is a blob data Jabber is how to transmit binary ? Sorry for by bad english. Thank you. -- Free pop3 email with a spam filter. http://www.bluebottle.com/tag/5 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php