[PHP] Re: $HTTP_SERVER_VARS not accessible in Functions (fwd)
What is your PHP Version ? Try putting the global $HTTP_SERVER_VARS; print_r($HTTP_SERVER_VARS); in your custom function and check out what is it printing... -S. Sukumar > I'm trying to access some settings in the $HTTP_SERVER_VARS[] array, but, > within a custom function() this array appears empty. In the calling script, > however, the $HTTP_SERVER_VARS[] array is defined. > > I thought this was supposed to be "superglobal" and available on every > level? If not, is there another command I can use? I also tried $_SERVER[] > but this appears to be always empty no matter what level I call it on. > > Thanks. > > Monty > > > . > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Redirect Question
That answers my question. Thanks, -- JJ Harrison [EMAIL PROTECTED] www.tececo.com "Tim Luoma" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > FWIW, a user note at http://www.php.net/manual/en/function.header.php > says : > > There is this nasty bug in IE 5 for Windows prior to service pack 2, > described in Microsoft knowledgebase article Q281197 which causes a > problem with redirecting.. if you submit a POST form to a page that > uses header() to redirect to another page after processing the form > data, then IE will not display some of the images on the page, if the > user has an "external HTTP namespace handler" (RealDownload for > example) installed. It took me a very long time to figure this out; I > had no idea why my ads weren't displaying on IE for windows but worked > fine everywhere else. > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] separated string by comas
$string = str_replace(" ", ",", $string); -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 4:57 PM To: php-general Subject: [PHP] separated string by comas I have a string that is separated by spaces like this $string="test test1 test2 test3"; how can I make the string so it is separated by comas like this $string="test,test1,test2,test3"; I know this is probably simple but I just can't figure it out -- Best regards, rdkurth mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Session Tracking
Hello all, This may be a pretty naive question. Do we have to use the key word session_register("variablename"); in every single page, in which we plan to use the "variablename"?. Or is it possible that we register the variablename once, and in the subsequent pages continue to access it using $variablename ? Thanks in advance, Sachin. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] separated string by comas
I have a string that is separated by spaces like this $string="test test1 test2 test3"; how can I make the string so it is separated by comas like this $string="test,test1,test2,test3"; I know this is probably simple but I just can't figure it out -- Best regards, rdkurth mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sessions without cookies : forms
You need to start the session before any html. So: Cheers! Rick "Too much caution is bad for you. By avoiding things you fear, you may let yourself in for unhappy consequences. It is usually wiser to stand up to a scary-seeming experience and walk right into it, risking the bruises as hard knocks. You are likely to find it is not as tough as you had thought. Or you may find it plenty tough, but also discover you have what it takes to handle it." - Norman Vincent Peale > From: PHPCoder <[EMAIL PROTECTED]> > Date: Mon, 22 Jul 2002 08:36:44 +0200 > To: php-general <[EMAIL PROTECTED]> > Subject: [PHP] Sessions without cookies : forms > > Hi, thanks for all the replies on my two previous postings relating to > sessions and cookies. > I have set my mind on using sessions but without cookies, so that > entails passing the SID via relative URL's. > My problem comes in here, when I create a simple login page with a form > that send username and password to the next page, I start_session(); and > then in the form action, I append the url with , but that > causes two parse errors. > > Warning: Cannot send session cookie - headers already sent by (output > started at /home/www/index.php:3) in /home/www/index.php on line 4 > > Warning: Cannot send session cache limiter - headers already sent > (output started at /home/www/index.php:3) in /home/www/index.php on line 4 > > The code is like so: > > >session_start(); > ?> > > > > > > > Admin Login > > > > Username: > > > > > > Password: > > > > > > > > > > > > > > What am I missing... > > Thanks > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sessions without cookies : forms
Hi, thanks for all the replies on my two previous postings relating to sessions and cookies. I have set my mind on using sessions but without cookies, so that entails passing the SID via relative URL's. My problem comes in here, when I create a simple login page with a form that send username and password to the next page, I start_session(); and then in the form action, I append the url with , but that causes two parse errors. Warning: Cannot send session cookie - headers already sent by (output started at /home/www/index.php:3) in /home/www/index.php on line 4 Warning: Cannot send session cache limiter - headers already sent (output started at /home/www/index.php:3) in /home/www/index.php on line 4 The code is like so: Admin Login Username: Password: What am I missing... Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] automatic credit card processing
great! it works! thank you very much! this is the code which does exactly what I wanted: $ch = curl_init (); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_POSTFIELDS, "RESP_FORMAT=1"); $result= curl_exec ($ch); curl_close ($ch); cheerio Martin Towell wrote: > either use curl, and set to option to return the results to you to on > or use ob_start(), ob_get_contents(), etc > > -Original Message- > From: Dominic [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 22, 2002 4:11 PM > To: [EMAIL PROTECTED] > Subject: [PHP] automatic credit card processing > > > Hi all > I try to automatically process cc payment. I use online clearing via a > third party > --> so what I have to do: > 1. SSL-TCP/IP connection to this third party-server > 2. perform basic http authentication > 3. send authorization request parameters to the software (via POST or GET) > 4. receive + parse authorization response > > 1-3 is not a real problem, but how can I receive the response, before it > is printed out to the browser/screen? I know I should get the response > string into a variable so the whole procedure is "silent", but how? > > thanks a lot for every little help! > > cheers > > dominic -- dominic brander dominic brander - snowflake productions gmbh - http://www.snowflake.ch tel. 01 451 75 71 - fax. 01 451 63 80 - mobile 076 543 17 94 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] automatic credit card processing
either use curl, and set to option to return the results to you to on or use ob_start(), ob_get_contents(), etc -Original Message- From: Dominic [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 4:11 PM To: [EMAIL PROTECTED] Subject: [PHP] automatic credit card processing Hi all I try to automatically process cc payment. I use online clearing via a third party --> so what I have to do: 1. SSL-TCP/IP connection to this third party-server 2. perform basic http authentication 3. send authorization request parameters to the software (via POST or GET) 4. receive + parse authorization response 1-3 is not a real problem, but how can I receive the response, before it is printed out to the browser/screen? I know I should get the response string into a variable so the whole procedure is "silent", but how? thanks a lot for every little help! cheers dominic -- dominic brander dominic brander - snowflake productions gmbh - http://www.snowflake.ch tel. 01 451 75 71 - fax. 01 451 63 80 - mobile 076 543 17 94 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] automatic credit card processing
Hi all I try to automatically process cc payment. I use online clearing via a third party --> so what I have to do: 1. SSL-TCP/IP connection to this third party-server 2. perform basic http authentication 3. send authorization request parameters to the software (via POST or GET) 4. receive + parse authorization response 1-3 is not a real problem, but how can I receive the response, before it is printed out to the browser/screen? I know I should get the response string into a variable so the whole procedure is "silent", but how? thanks a lot for every little help! cheers dominic -- dominic brander dominic brander - snowflake productions gmbh - http://www.snowflake.ch tel. 01 451 75 71 - fax. 01 451 63 80 - mobile 076 543 17 94 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Hex Help Please...
Doesn't look like anyone has replied to you on the php-general mailing list. Have a look at this page http://www.wotsit.org/search.asp?s=graphics some of the docs there might help you HTH Martin -Original Message- From: Georgie Casey [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 6:16 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP] Hex Help Please... Rite, There's a PHP script that takes a monochrome BMP and converts it into some sort of hex code and I've noticed some patterns with this code. This image is 72 pixels wide by 14 high so there's 1008 pixels. In the code returned, theres 252 chars, which is 1008 divided by 4. So I guessed the image is split into 4 pixels each. So if I pass an image with the first pixel black and everyhting else white, it returns 8 for those 4. If I pass an image with the first and second black, it returns c. With the first three black, it returns e. With the first 4, f. And if I have the 5th pixel black it goes onto the next char code, eg returning f for the first 4 pixels, then 8 for the 5th pixel black, ie the first pixel in the next 4. In total it returns f8. PS I tried reading in each pixel of the script, checking if it was black or white, 1 for black, 0 for white. Then converting these 0s and 1s from decimal to hex, then converting from binary to hex, but to no avail. Then I tried taking a set of 4 1s or 0s and converting them, but still no luck. So my questions is, does anyone know how theyre encoding the image I could probably could decipher the coding with some experimentation but it really looks like hex and I might be wasting my time. TIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: how can this be? GET instead of POST -> db error
The person could have been trying to break into the DB. "Andy" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi everybody, > > I am just trying to find out how some db errors happened during a user was > browsing my web app. > > This is out of the Apache log: > > GET /subapp_profiles/act_upload_image.php HTTP/1.1" 200 160 > POST /subapp_profiles/act_upload_image.php HTTP/1.1" 302 5 > > I do not have a clue where this GET request could come from. This has caused > a empty sql statement and therefore a db error. How can could this be > achieved? By clicking back in the browser window? I dont think so since the > same user was on another site before. > > Has anybody a idea on that? > > Andy > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: html entry within XML "database"
You can of course use htmlspecialcharacters (check php manual if you don't know what this is) and then it will kill every thing that generates errors. "William S." <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I am experimenting with using an XML file as a > database. One of the things I do is provide > a way of adding records to the database by an > html form. > > This seems to work out well so far unless one > of the fields in a record contains an html > reference. The result is a Sablotron parse error. > > What is the best way around this? Should I > validate the form before it is submitted so that > html references are rejected? How would I do this? > > -- > Bill > Amsterdam, NL -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] $HTTP_SERVER_VARS not accessible in Functions
I'm trying to access some settings in the $HTTP_SERVER_VARS[] array, but, within a custom function() this array appears empty. In the calling script, however, the $HTTP_SERVER_VARS[] array is defined. I thought this was supposed to be "superglobal" and available on every level? If not, is there another command I can use? I also tried $_SERVER[] but this appears to be always empty no matter what level I call it on. Thanks. Monty -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Images of GD Library
1. How can I store an image in a database.. ? 2. How can this be now used to create an image ? 3. Is there any way I can read an image from a remote site and save it's minature view in my DB / file ? (How can an image be resized ?) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cookies - good or bad???
Can't you say that about anything? "Scott Fletcher" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I don't use cookies either due to the fact that some web browser block the > cookies and some web browser's bug that affected the cookie. For example, > if Internet Explorer have a bug with the cookie then it is gurantee that > you'll never find MS to have this bug fix in a few days. It could take 6 > months or a year. So, what's the point with using hte cookie? > > "Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > On Thu, Jul 18, 2002 at 03:38:51PM +0200, PHPCoder wrote: > > > > > What are the general feeling out there amongst developers about the use > > > of cookies? > > > > Cookies rely on client side. I never rely on the client for anything. > > > > When it comes to examples of how to do things "The Right Way," I say go > > take a look at amazon.com. No cookies. No Java'sCrap. Works flawlessly. > > > > --Dan > > > > -- > >PHP classes that make web design easier > > SQL Solution | Layout Solution | Form Solution > > sqlsolution.info | layoutsolution.info | formsolution.info > > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > > 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Using Javascript
You use the "onClick" feature like this: no semicolon unless there is more than one thing being called/defined -- you use single quotes within the onClick's double quotes "Uma Shankari T." <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Hello, > > I need to display a value on the text box during onClick event where the > data is fetched from the database..I have given the code like this but it > is giving unterminated string constant.. > > > "); > > > Can anyone please tell me how to solve this ... > > > Thanks & Regards, > Uma > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Using Javascript
Hello, I need to display a value on the text box during onClick event where the data is fetched from the database..I have given the code like this but it is giving unterminated string constant.. "); Can anyone please tell me how to solve this ... Thanks & Regards, Uma -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Oh, the problem
Sure thing. Always love to help. -Chris "César aracena" <[EMAIL PROTECTED]> wrote in message 001801c23136$6748bb50$adc405c8@gateway">news:001801c23136$6748bb50$adc405c8@gateway... Chris. Thanks for living me a hand in such a fast way. It helped me fine. César. > -Original Message- > From: Chris Earle [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 22, 2002 12:51 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Oh, the problem > > It appears that $username isn't being defined within the scope of the > query. > You define it only in the function. > > Try do this instead: > > $username = ""; > > function pic_upload($userid) > { > global $username; > //... the rest of the code > } > // now do the queries and everything else. > > I think that will fix your problem. > > "César aracena" <[EMAIL PROTECTED]> wrote in message > 000301c23129$aebbab30$adc405c8@gateway">news:000301c23129$aebbab30$adc405c8@gateway... > Hi all. I'm trying to handle a picture upload. So far, I've made my > script store it where I want with the name I want. The only problem now, > is that it should store that given name into a MySQL DB table. I tried > it by calling a function which stores the picture and returns a variable > called $picname then use an UPDATE statement but that variable isn't > passed. any ideas? The code looks like this: > > function pic_upload($userid) > { > if (is_uploaded_file($_FILES['devpicture']['tmp_name'])) > { > $filename = $_FILES['devpicture']['tmp_name']; > > $realname = $_FILES['devpicture']['name']; > > $username = $userid.".jpg"; > > copy($_FILES['devpicture']['tmp_name'], > "c:/apache/htdocs/os-seek/photos\\".$username); > > $username; > } > else > { > echo "Possible file upload attack: filename > ".$_FILES['devpicture']['name']."."; > } > } > > --- > and then the updating > --- > > pic_upload($id); > > $query = "UPDATE os_developers SET devpicture = '$username' WHERE devid > = $id"; > $result = mysql_query($query) or die(mysql_error()); > > Thanks in advance, > > Cesar Aracena > CE / MCSE+I > Neuquen, Argentina > +54.299.6356688 > +54.299.4466621 > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] email
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > > >try doing a echo eg > > > >$mail = mail( $to, $subj, $Message ); > >echo $to; > >echo ""; > >echo $subj; > >echo ""; > >echo $Message; > >echo ""; > >echo $mail; > > > >and see if that is setting the variables...if $mail = 1 then on php's side mail is >sent if it's 0 then u have an error > > How can I see what the error is? > Check the logs for your MTA (sendmail, qmail whatever) for errors -- David Robley Temporary Kiwi! Quod subigo farinam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] email
> >try doing a echo eg > > > >$mail = mail( $to, $subj, $Message ); > >echo $to; > >echo ""; > >echo $subj; > >echo ""; > >echo $Message; > >echo ""; > >echo $mail; > > > >and see if that is setting the variables...if $mail = 1 then on > php's side mail is sent if it's 0 then u have an error > > How can I see what the error is? > what do the echo's say? if they have no input then there's a error also but not 100% on this if u put error_reporting=E_ALL & ~E_NOTICE in php that might tell u where bouts the error is..
Re: [PHP] Inline Images ?
Hi, I've never done much in the way of dynamic images, but I don't believe you send images inline... I believe browsers still need an image tag, but instead of myimage.gif, I'm pretty sure you call a php script instead: makeMeAnImage.php outputs a GIF/JPG/PNG header, followed by the image data. At least that's my (limited, theoretical) understanding. Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] email
>try doing a echo eg > >$mail = mail( $to, $subj, $Message ); >echo $to; >echo ""; >echo $subj; >echo ""; >echo $Message; >echo ""; >echo $mail; > >and see if that is setting the variables...if $mail = 1 then on php's side mail is >sent if it's 0 then u have an error How can I see what the error is? >> -Original Message- >> From: Bob Lockie [mailto:[EMAIL PROTECTED]] >> Sent: Monday, 22 July 2002 1:56 PM >> To: [EMAIL PROTECTED] >> Subject: [PHP] email >> >> >> >> I need help with sending email. >> I can hear 127.0.0.1 doing something (I assume it sends email >> because there are no bounces). >> >> I have the following in my php.ini file: >> >> sendmail_from = [EMAIL PROTECTED] >> sendmail_path = /usr/sbin/sendmail -t -i >> >> >> The PHP is: >> mail( $to, $subj, $Message ); >> >> I am sure all the variables are valid. >> >> >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> >> > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Oh, the problem
Chris. Thanks for living me a hand in such a fast way. It helped me fine. César. > -Original Message- > From: Chris Earle [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 22, 2002 12:51 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Oh, the problem > > It appears that $username isn't being defined within the scope of the > query. > You define it only in the function. > > Try do this instead: > > $username = ""; > > function pic_upload($userid) > { > global $username; > //... the rest of the code > } > // now do the queries and everything else. > > I think that will fix your problem. > > "César aracena" <[EMAIL PROTECTED]> wrote in message > 000301c23129$aebbab30$adc405c8@gateway">news:000301c23129$aebbab30$adc405c8@gateway... > Hi all. I'm trying to handle a picture upload. So far, I've made my > script store it where I want with the name I want. The only problem now, > is that it should store that given name into a MySQL DB table. I tried > it by calling a function which stores the picture and returns a variable > called $picname then use an UPDATE statement but that variable isn't > passed. any ideas? The code looks like this: > > function pic_upload($userid) > { > if (is_uploaded_file($_FILES['devpicture']['tmp_name'])) > { > $filename = $_FILES['devpicture']['tmp_name']; > > $realname = $_FILES['devpicture']['name']; > > $username = $userid.".jpg"; > > copy($_FILES['devpicture']['tmp_name'], > "c:/apache/htdocs/os-seek/photos\\".$username); > > $username; > } > else > { > echo "Possible file upload attack: filename > ".$_FILES['devpicture']['name']."."; > } > } > > --- > and then the updating > --- > > pic_upload($id); > > $query = "UPDATE os_developers SET devpicture = '$username' WHERE devid > = $id"; > $result = mysql_query($query) or die(mysql_error()); > > Thanks in advance, > > Cesar Aracena > CE / MCSE+I > Neuquen, Argentina > +54.299.6356688 > +54.299.4466621 > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Inline Images ?
> Is there a way to display an image withouth sending the headers first? > > I'm trying to display an inline image... but when I try it just only > send the raw image data... > > I've thinking that I need to save an image first to disk and then > display the image later... > You need to have a separate file that creates your images. Where file.php should create your image headers and send the data. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sessions vs passing variables
Right, I understand I should be able to access them. That's the whole problem. They're not there. I can do one of two things and they magically become available: 1. Don't start the session. 2. Use single variables, not arrays. #2, however, would create a problem in that I intend to set it up that a person can have more than one item in their shopping cart. This hoses that, as I was planning on having the product ids passed as hidden fields so as not to have to rely on the session functions to keep items in the shopping cart. Mike "John Holmes" <[EMAIL PROTECTED]> wrote in message 002001c23131$e05a0670$b402a8c0@mango">news:002001c23131$e05a0670$b402a8c0@mango... > > I'm on a server with php version 4.2.1 with register globals on. The > main > > test has been can I access the variables in the script? Oddly enough, > if > > I > > didn't use an array they are there for me. Turns out it's only when > I'm > > trying to pass an array. Single variables works fine. I'm beginning > to > > think it's a bug. > > Why are you trying to use an array? The values are there, I imagine you > are just trying to access them incorrectly. > > > > > Order > > For that URL, which you should be using quotes around, you'll have > $_GET['prod_ids'][0] --> 9 and $_GET['prod_qtys'][0] --> 1. Or, > $prod_ids[0] --> 9, etc, since register_globals is on. > > ---John Holmes... > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Inline Images ?
Hello list... Is there a way to display an image withouth sending the headers first? I'm trying to display an inline image... but when I try it just only send the raw image data... I've thinking that I need to save an image first to disk and then display the image later... I don't want to do this... but I wanna hear another possiblities before doing that... Any suggestions? Roberto Ramírez
[PHP] email
I need help with sending email. I can hear 127.0.0.1 doing something (I assume it sends email because there are no bounces). I have the following in my php.ini file: sendmail_from = [EMAIL PROTECTED] sendmail_path = /usr/sbin/sendmail -t -i The PHP is: mail( $to, $subj, $Message ); I am sure all the variables are valid. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Oh, the problem
It appears that $username isn't being defined within the scope of the query. You define it only in the function. Try do this instead: $username = ""; function pic_upload($userid) { global $username; //... the rest of the code } // now do the queries and everything else. I think that will fix your problem. "César aracena" <[EMAIL PROTECTED]> wrote in message 000301c23129$aebbab30$adc405c8@gateway">news:000301c23129$aebbab30$adc405c8@gateway... Hi all. I'm trying to handle a picture upload. So far, I've made my script store it where I want with the name I want. The only problem now, is that it should store that given name into a MySQL DB table. I tried it by calling a function which stores the picture and returns a variable called $picname then use an UPDATE statement but that variable isn't passed. any ideas? The code looks like this: function pic_upload($userid) { if (is_uploaded_file($_FILES['devpicture']['tmp_name'])) { $filename = $_FILES['devpicture']['tmp_name']; $realname = $_FILES['devpicture']['name']; $username = $userid.".jpg"; copy($_FILES['devpicture']['tmp_name'], "c:/apache/htdocs/os-seek/photos\\".$username); $username; } else { echo "Possible file upload attack: filename ".$_FILES['devpicture']['name']."."; } } --- and then the updating --- pic_upload($id); $query = "UPDATE os_developers SET devpicture = '$username' WHERE devid = $id"; $result = mysql_query($query) or die(mysql_error()); Thanks in advance, Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Sessions vs passing variables
> I'm on a server with php version 4.2.1 with register globals on. The main > test has been can I access the variables in the script? Oddly enough, if > I > didn't use an array they are there for me. Turns out it's only when I'm > trying to pass an array. Single variables works fine. I'm beginning to > think it's a bug. Why are you trying to use an array? The values are there, I imagine you are just trying to access them incorrectly. > > > Order For that URL, which you should be using quotes around, you'll have $_GET['prod_ids'][0] --> 9 and $_GET['prod_qtys'][0] --> 1. Or, $prod_ids[0] --> 9, etc, since register_globals is on. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: NOT an easy upload
>>function pic_upload($userid) >>{ >>if (is_uploaded_file($_FILES['devpicture']['tmp_name'])) >>{ >>$filename = $_FILES['devpicture']['tmp_name']; >>$realname = $_FILES['devpicture']['name']; >>$username = $userid.".jpg"; >>copy($_FILES['devpicture']['tmp_name'], "c:/apache/htdocs/os-seek/photos\\".$username); >>$username; >>} >>else >>{ >>echo "Possible file upload attack: filename >>".$_FILES['devpicture']['name']."."; >>} >>} >>--- >>and then the updating >>--- >>pic_upload($id); >>$query = "UPDATE os_developers SET devpicture = '$username' WHERE devid >>= $id"; >>$result = mysql_query($query) or die(mysql_error()); I don't exactly know what is wrong, but I can definitely tell you that you have two gaping security holes with this code. Unless you're doing checks that you did not show (which is highly likely), $username and $id can be set to anything. I'm not exactly sure how important/unimpornant some of that stuff is, but you might want to make sure you kill off MySQL comment code inside there and other possible exploits. The other problem with your code is that you're not debugging it. Set up echo statements here and there to make sure variables are defined as you think they are, that's the biggest mistake I see myself and others make, not defining variables as I think I am. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sessions vs passing variables
I'm on a server with php version 4.2.1 with register globals on. The main test has been can I access the variables in the script? Oddly enough, if I didn't use an array they are there for me. Turns out it's only when I'm trying to pass an array. Single variables works fine. I'm beginning to think it's a bug. Mike "John Holmes" <[EMAIL PROTECTED]> wrote in message 001e01c2312e$a6149aa0$b402a8c0@mango">news:001e01c2312e$a6149aa0$b402a8c0@mango... > How are you testing whether the variables were passed or not? What > version of PHP are you using and is register_globals ON or OFF? > > ---John Holmes... > > > -Original Message- > > From: Mike Mannakee [mailto:[EMAIL PROTECTED]] > > Sent: Sunday, July 21, 2002 10:57 PM > > To: [EMAIL PROTECTED] > > Subject: Re: [PHP] Sessions vs passing variables > > > > No, > > > > The strange thing is there isn't. I have a test page that links to > the > > order form, having this html: > > > > > > > > > > > > > > > > > > > > > > Order > > > > I've tried it here as both a link and as hidden forms. Neither on > works > > if > > I begin the script with: > > > > if(!(session_id())) > > session_start(); > > > > I've actually figured a bit of a workaround by having the session > begun on > > earlier pages, and just continued on the order form. I think when a > > session > > is begun the server sends a cookie to the browser, and somehow that > > transaction wipes out the variables, whether posted or passed by URL. > > It's > > a bit of a pain but it seems to be working. I'm just now slightly > nervous > > that the order form is unable to begin a session if it needs to, but > one > > lives, right? > > > > Mike > > > > > > "John Holmes" <[EMAIL PROTECTED]> wrote in message > > 001b01c2311f$e19a2cc0$b402a8c0@mango">news:001b01c2311f$e19a2cc0$b402a8c0@mango... > > > > When I try to pass a variable from one page to another the > variable is > > > > completely inaccessible IF I have a session going. The data has > to be > > > > passed from one page to the next through the link, as the link > tells > > > which > > > > product the user hit. Any thoughts? > > > > > > Is there a variable by the same name in the session? If > register_globals > > > is on, the session value could be overwriting the GET value. > > > > > > ---John Holmes... > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Faster: Includes or DB Queries??
> Is there much of a difference in speed or efficiency between INCLUDEing > files in a script or loading data from a database? I'm building a dynamic > menu system for a website and not sure if it would be faster to store > button > data in a DB or just do it with Included files. Includes are faster overall. If you already have a database connection open for other things, then there won't be as much of an overhead for using the database. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Faster: Includes or DB Queries??
Is there much of a difference in speed or efficiency between INCLUDEing files in a script or loading data from a database? I'm building a dynamic menu system for a website and not sure if it would be faster to store button data in a DB or just do it with Included files. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Sessions vs passing variables
How are you testing whether the variables were passed or not? What version of PHP are you using and is register_globals ON or OFF? ---John Holmes... > -Original Message- > From: Mike Mannakee [mailto:[EMAIL PROTECTED]] > Sent: Sunday, July 21, 2002 10:57 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Sessions vs passing variables > > No, > > The strange thing is there isn't. I have a test page that links to the > order form, having this html: > > > > > > > > > > > Order > > I've tried it here as both a link and as hidden forms. Neither on works > if > I begin the script with: > > if(!(session_id())) > session_start(); > > I've actually figured a bit of a workaround by having the session begun on > earlier pages, and just continued on the order form. I think when a > session > is begun the server sends a cookie to the browser, and somehow that > transaction wipes out the variables, whether posted or passed by URL. > It's > a bit of a pain but it seems to be working. I'm just now slightly nervous > that the order form is unable to begin a session if it needs to, but one > lives, right? > > Mike > > > "John Holmes" <[EMAIL PROTECTED]> wrote in message > 001b01c2311f$e19a2cc0$b402a8c0@mango">news:001b01c2311f$e19a2cc0$b402a8c0@mango... > > > When I try to pass a variable from one page to another the variable is > > > completely inaccessible IF I have a session going. The data has to be > > > passed from one page to the next through the link, as the link tells > > which > > > product the user hit. Any thoughts? > > > > Is there a variable by the same name in the session? If register_globals > > is on, the session value could be overwriting the GET value. > > > > ---John Holmes... > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Redirect Question
FWIW, a user note at http://www.php.net/manual/en/function.header.php says : There is this nasty bug in IE 5 for Windows prior to service pack 2, described in Microsoft knowledgebase article Q281197 which causes a problem with redirecting.. if you submit a POST form to a page that uses header() to redirect to another page after processing the form data, then IE will not display some of the images on the page, if the user has an "external HTTP namespace handler" (RealDownload for example) installed. It took me a very long time to figure this out; I had no idea why my ads weren't displaying on IE for windows but worked fine everywhere else. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sessions vs passing variables
No, The strange thing is there isn't. I have a test page that links to the order form, having this html: Order I've tried it here as both a link and as hidden forms. Neither on works if I begin the script with: if(!(session_id())) session_start(); I've actually figured a bit of a workaround by having the session begun on earlier pages, and just continued on the order form. I think when a session is begun the server sends a cookie to the browser, and somehow that transaction wipes out the variables, whether posted or passed by URL. It's a bit of a pain but it seems to be working. I'm just now slightly nervous that the order form is unable to begin a session if it needs to, but one lives, right? Mike "John Holmes" <[EMAIL PROTECTED]> wrote in message 001b01c2311f$e19a2cc0$b402a8c0@mango">news:001b01c2311f$e19a2cc0$b402a8c0@mango... > > When I try to pass a variable from one page to another the variable is > > completely inaccessible IF I have a session going. The data has to be > > passed from one page to the next through the link, as the link tells > which > > product the user hit. Any thoughts? > > Is there a variable by the same name in the session? If register_globals > is on, the session value could be overwriting the GET value. > > ---John Holmes... > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] NOT an easy upload
Hi all. Im trying to handle a picture upload. So far, Ive made my script store it where I want with the name I want. The only problem now, is that it should store that given name into a MySQL DB table I tried it by calling a function which stores the picture and returns a variable called $picname then use an UPDATE statement but that variable isnt passed any ideas? The code looks like this: function pic_upload($userid) { if (is_uploaded_file($_FILES['devpicture']['tmp_name'])) { $filename = $_FILES['devpicture']['tmp_name']; $realname = $_FILES['devpicture']['name']; $username = $userid.".jpg"; copy($_FILES['devpicture']['tmp_name'], "c:/apache/htdocs/os-seek/photos\\".$username); $username; } else { echo "Possible file upload attack: filename ".$_FILES['devpicture']['name']."."; } } --- and then the updating --- pic_upload($id); $query = "UPDATE os_developers SET devpicture = '$username' WHERE devid = $id"; $result = mysql_query($query) or die(mysql_error()); Thanks in advance, Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Redirect Question
On Monday 22 July 2002 10:35, Chris Earle wrote: > > Which versions of IE is somebody claiming can't handle a Location: > > header? > > And it's not version 4 (I'm assuming not 5(.5) either) When you say version 4, which version 4 do you mean? Ditto for version 5. With so many patches and 'upgrades' issued for IE I won't surprised if there is some combination which causes Location: header to fail. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* All life evolves by the differential survival of replicating entities. -- Dawkins */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: server performance
I think that's entirely dependent on the server's OS. If the OS has a problem, then yes, obviously, otherwise I don't see a reason (unless there is a bug) for significant speed loss. "Eat Pasta Type Fasta" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Not exactly a PHP question, but you guys will know, > > is there a significant performance difference in how long does it take a > server to find files as the directories become more nested, > > eg. > > 1. file index.php uses images from directory DIR > > vs. > > 2. file index.php uses images from directory images/DIR > > vs. > > 3. file index.php uses images from directory files/images/DIR > > Thanks in advance, > > R> > > > > --__-__-__ > eat pasta > type fasta > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Redirect Question
> Which versions of IE is somebody claiming can't handle a Location: header? And it's not version 4 (I'm assuming not 5(.5) either) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Redirect Question
> Which versions of IE is somebody claiming can't handle a Location: header? It's not version 6 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: HTML E-mails
What's so hard with stopping script kiddies (which is just about all you can do with an e-mail to my knowledge -- aside from attachments). In PHP or Perl you could easily write a script that kills ANY
Re: Re[4]: [PHP] Submitting to cgi script
> This worked now my question is. Is there a way to force it to submit with > POST rather than GET > Look at the CURL functions on php.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] server performance
Not exactly a PHP question, but you guys will know, is there a significant performance difference in how long does it take a server to find files as the directories become more nested, eg. 1. file index.php uses images from directory DIR vs. 2. file index.php uses images from directory images/DIR vs. 3. file index.php uses images from directory files/images/DIR Thanks in advance, R> --__-__-__ eat pasta type fasta -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Sessions vs passing variables
> When I try to pass a variable from one page to another the variable is > completely inaccessible IF I have a session going. The data has to be > passed from one page to the next through the link, as the link tells which > product the user hit. Any thoughts? Is there a variable by the same name in the session? If register_globals is on, the session value could be overwriting the GET value. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: HTML E-Mail
Damn, what a flame war I've started! I had no idea... In any case, Richard: I agree that HTML e-mails, generally speaking, suck. The most HTML I **personally** think should be in an e-mail is a quick link to a web page, maybe a bit of text coloration/sizing for emphasis. However, **professionally**, I'm looking at something completely different. I run a small web services business looking for any form of cash possible, and a local portal site has offered to promote on their site an HTML e-mailing system that we create -- and they have customers *begging* for it. While I as an individual may despise HTML e-mail, I as a businessman cannot turn down such an obvious revenue-generation stream, especially in today's economy. I came to the list looking for technical help because it's something that I need to do, not something I want to promote. Whatever my motives may have been, though, there's no reason to launch such a tirade on the subject on-list -- if you want to bitch and moan and flame, it's just as easy to do off-list. Please, please, let's kill this thread and all the animosity going with it -- *especially* since I've been kindly pointed in all the directions needed for technical help. Alex Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[4]: [PHP] Submitting to cgi script
Hello Ray, This worked now my question is. Is there a way to force it to submit with POST rather than GET Sunday, July 21, 2002, 5:12:30 PM, you wrote: RH> Instead of doing it as a command, try it through the webserver RH> header( "Location: RH> http://localhost/cgi-bin/siteUserEmail/siteUserEmail.cgi?forwardaddr=$forwar RH> daddr&aliases=$aliases&vacationmode=$vacationmode&vacationmsg=$vacationmsg&n RH> ame=$name&group=$group&page=$page" ); ?>> RH> Or you can use something else...but send it to the web server... RH> .: B i g D o g :. RH> - Original Message - RH> From: <[EMAIL PROTECTED]> RH> To: "B i g D o g" <[EMAIL PROTECTED]>; "php-general" RH> <[EMAIL PROTECTED]> RH> Sent: Sunday, July 21, 2002 6:15 PM RH> Subject: Re[2]: [PHP] Submitting to cgi script >> Hello B, >> I just submitted directly to the cgi script and did it with a GET and >> it worked so that is not the problem. Any other suggestions >> >> Sunday, July 21, 2002, 4:52:09 PM, you wrote: >> >> >> BigDog> In your example you are using the method of POST to pass the form RH> data to >> BigDog> the cgi script. However, when you pass the data to the cgi script RH> from the >> BigDog> php script you are using the GET method to pass the data. >> >> BigDog> Check and see if the cgi can accept with METHOD="GET" >> >> BigDog> .: B i g D o g :. >> >> >> BigDog> - Original Message - >> BigDog> From: <[EMAIL PROTECTED]> >> BigDog> To: "php-general" <[EMAIL PROTECTED]> >> BigDog> Sent: Sunday, July 21, 2002 5:46 PM >> BigDog> Subject: [PHP] Submitting to cgi script >> >> >> >> How can I do this >> >> >> >> I have a form that I want to submit to a second php script that in turn >> >> submits to a cgi script but I can not get it to work. If I submit >> >> from the form to the cgi script it works just fine. But there are >> >> something that I need to do with the data besides submitting to the >> >> cgi script. Could you look at the sample code below and see if I am >> >> doing something wrong. I hope this makes sense I am not quit sure how >> >> to ask what I want to know >> >> If I was submitting directly to the cgi script the form action would >> >> look like this >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> > >> >> >> >> >> >> >> >> >> >> >> >> >> >> The siteUserEmail.php file >> >> > >> $cmd="/cgi-bin/siteUserEmail/siteUserEmail.cgi?forwardaddr=$forwardaddr >> >> &aliases=$aliases&vacationmode=$vacationmode&vacationmsg=$vacationmsg >> >> &name=$name&group=$group&page=$page"; >> >> exec($cmd); >> >> ?> >> >> -- >> >> Best regards, >> >> rdkurth mailto:[EMAIL PROTECTED] >> >> >> >> >> >> -- >> >> PHP General Mailing List (http://www.php.net/) >> >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> >> >> >> -- >> Best regards, >> rdkurthmailto:[EMAIL PROTECTED] >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php -- Best regards, rdkurthmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Sessions vs passing variables
What do you mean by pass? Using a GET method, POST, COOKIE or are you trying to do something else (other than SESSION)? "Mike Mannakee" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > When I try to pass a variable from one page to another the variable is > completely inaccessible IF I have a session going. The data has to be > passed from one page to the next through the link, as the link tells which > product the user hit. Any thoughts? > > Mike Mannakee > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Amazon Web Service implemented in PHP
http://www.amazonlite.com/ --Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Traversing an appendable file
Is there any way to fseek (or something to the exact same effect) a file opened with "a" or "a+"? I've tried rewinding and fseeking appendable files, but neither work. Opening up in "r+" gives me part of the desired result, but if where I want to write is not at the end, it writes over things, which I obviously do not want. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] get a list of clients with PHP
Hello Richard, > > My problem: > > How can I receive a list of the PC's switched on > > at present with PHP? > > System calls are not a genuine solution. > > The Script is not only to work under Linux. > I don't think fsockopen's failure to open a socket > will "kill" a PHP script... harm, I know that it like that is. It annoys me already since PHP 3.0.3 ... :-( Therefore I did not also ask for it. I hope my problem to have clearly designated. w. b. r. Norbert __ normally: +49-(0)2292-681769 mobil call: +49-(0)177-2373368 -- e.o.m. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Hex Help Please...
OK, i thought I found my solution but... How come if I convert from "1000" from Binary to Hex in calculator, it returns 8, but when I use the PHP bin2hex function, it returns loads of 3s and 0s "Georgie Casey" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Rite, > > There's a PHP script that takes a monochrome BMP and converts it into some > sort of hex code and I've noticed some patterns with this code. This image > is 72 pixels wide by 14 high so there's 1008 pixels. In the code returned, > theres 252 chars, which is 1008 divided by 4. > > So I guessed the image is split into 4 pixels each. So if I pass an image > with the first pixel black and everyhting else white, it returns 8 for those > 4. If I pass an image with the first and second black, it returns c. > > With the first three black, it returns e. With the first 4, f. And if I have > the 5th pixel black it goes onto the next char code, eg returning f for the > first 4 pixels, then 8 for the 5th pixel black, ie the first pixel in the > next 4. In total it returns f8. > > PS > I tried reading in each pixel of the script, checking if it was black or > white, 1 for black, 0 for white. Then converting these 0s and 1s from > decimal to hex, then converting from binary to hex, but to no avail. Then I > tried taking a set of 4 1s or 0s and converting them, but still no luck. > > So my questions is, does anyone know how theyre encoding the image I > could probably could decipher the coding with some experimentation but it > really looks like hex and I might be wasting my time. > > TIA > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sessions vs passing variables
When I try to pass a variable from one page to another the variable is completely inaccessible IF I have a session going. The data has to be passed from one page to the next through the link, as the link tells which product the user hit. Any thoughts? Mike Mannakee -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Hex Help Please...
Rite, There's a PHP script that takes a monochrome BMP and converts it into some sort of hex code and I've noticed some patterns with this code. This image is 72 pixels wide by 14 high so there's 1008 pixels. In the code returned, theres 252 chars, which is 1008 divided by 4. So I guessed the image is split into 4 pixels each. So if I pass an image with the first pixel black and everyhting else white, it returns 8 for those 4. If I pass an image with the first and second black, it returns c. With the first three black, it returns e. With the first 4, f. And if I have the 5th pixel black it goes onto the next char code, eg returning f for the first 4 pixels, then 8 for the 5th pixel black, ie the first pixel in the next 4. In total it returns f8. PS I tried reading in each pixel of the script, checking if it was black or white, 1 for black, 0 for white. Then converting these 0s and 1s from decimal to hex, then converting from binary to hex, but to no avail. Then I tried taking a set of 4 1s or 0s and converting them, but still no luck. So my questions is, does anyone know how theyre encoding the image I could probably could decipher the coding with some experimentation but it really looks like hex and I might be wasting my time. TIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] include files and global variables
I think that you need to call the checkMaster() function AFTER you declare it, not before. Try moving "checkMaster();" beneath the function definition. Mick On Sun, 21 Jul 2002, Jon Wyatt wrote: > > I have some pages which include a number of files. > In one of the include files I have a function which I wish to be executed > everytime the include file is loaded. > > Therefore I place the function name in the include file at the top. > > However, this function uses a session variable to decide whether to call > another function and it appears that this variable is not being carried > across. For example, the start of the include file might look like this:- > > > > checkMaster(); > > > function checkMaster() > { > global $master_session; > if ($master_session[db_host]) > { > connectToDB(); > } > } > > > function connectToDB() > { > ... > > > > The master_session variable is not set and hence connectToDB is never > called. > If I place the checkMaster code in each page that includes this file then it > all works fine. How do I get round this? > > Thanks. > > jon. > > Better than having your body rubbed vigorously with a cheese grater. > http://www.samuri.co.uk. > > > _ > MSN Photos is the easiest way to share and print your photos: > http://photos.msn.com/support/worldwide.aspx > > > -- n i n t i . c o m php-python-perl-mysql-postgresql Michael Hall [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re[2]: [PHP] Submitting to cgi script
Instead of doing it as a command, try it through the webserver http://localhost/cgi-bin/siteUserEmail/siteUserEmail.cgi?forwardaddr=$forwar daddr&aliases=$aliases&vacationmode=$vacationmode&vacationmsg=$vacationmsg&n ame=$name&group=$group&page=$page" ); ?> Or you can use something else...but send it to the web server... .: B i g D o g :. - Original Message - From: <[EMAIL PROTECTED]> To: "B i g D o g" <[EMAIL PROTECTED]>; "php-general" <[EMAIL PROTECTED]> Sent: Sunday, July 21, 2002 6:15 PM Subject: Re[2]: [PHP] Submitting to cgi script > Hello B, > I just submitted directly to the cgi script and did it with a GET and > it worked so that is not the problem. Any other suggestions > > Sunday, July 21, 2002, 4:52:09 PM, you wrote: > > > BigDog> In your example you are using the method of POST to pass the form data to > BigDog> the cgi script. However, when you pass the data to the cgi script from the > BigDog> php script you are using the GET method to pass the data. > > BigDog> Check and see if the cgi can accept with METHOD="GET" > > BigDog> .: B i g D o g :. > > > BigDog> - Original Message - > BigDog> From: <[EMAIL PROTECTED]> > BigDog> To: "php-general" <[EMAIL PROTECTED]> > BigDog> Sent: Sunday, July 21, 2002 5:46 PM > BigDog> Subject: [PHP] Submitting to cgi script > > > >> How can I do this > >> > >> I have a form that I want to submit to a second php script that in turn > >> submits to a cgi script but I can not get it to work. If I submit > >> from the form to the cgi script it works just fine. But there are > >> something that I need to do with the data besides submitting to the > >> cgi script. Could you look at the sample code below and see if I am > >> doing something wrong. I hope this makes sense I am not quit sure how > >> to ask what I want to know > >> If I was submitting directly to the cgi script the form action would > >> look like this > >> > >> > >> > >> > >> > >> > >> > >> > >> > > >> > >> > >> > >> > >> > >> > >> The siteUserEmail.php file > >> >> $cmd="/cgi-bin/siteUserEmail/siteUserEmail.cgi?forwardaddr=$forwardaddr > >> &aliases=$aliases&vacationmode=$vacationmode&vacationmsg=$vacationmsg > >> &name=$name&group=$group&page=$page"; > >> exec($cmd); > >> ?> > >> -- > >> Best regards, > >> rdkurth mailto:[EMAIL PROTECTED] > >> > >> > >> -- > >> PHP General Mailing List (http://www.php.net/) > >> To unsubscribe, visit: http://www.php.net/unsub.php > > > > > -- > Best regards, > rdkurthmailto:[EMAIL PROTECTED] > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] Submitting to cgi script
Hello B, I just submitted directly to the cgi script and did it with a GET and it worked so that is not the problem. Any other suggestions Sunday, July 21, 2002, 4:52:09 PM, you wrote: BigDog> In your example you are using the method of POST to pass the form data to BigDog> the cgi script. However, when you pass the data to the cgi script from the BigDog> php script you are using the GET method to pass the data. BigDog> Check and see if the cgi can accept with METHOD="GET" BigDog> .: B i g D o g :. BigDog> - Original Message - BigDog> From: <[EMAIL PROTECTED]> BigDog> To: "php-general" <[EMAIL PROTECTED]> BigDog> Sent: Sunday, July 21, 2002 5:46 PM BigDog> Subject: [PHP] Submitting to cgi script >> How can I do this >> >> I have a form that I want to submit to a second php script that in turn >> submits to a cgi script but I can not get it to work. If I submit >> from the form to the cgi script it works just fine. But there are >> something that I need to do with the data besides submitting to the >> cgi script. Could you look at the sample code below and see if I am >> doing something wrong. I hope this makes sense I am not quit sure how >> to ask what I want to know >> If I was submitting directly to the cgi script the form action would >> look like this >> >> >> >> >> >> >> >> >> > >> >> >> >> >> >> >> The siteUserEmail.php file >> > $cmd="/cgi-bin/siteUserEmail/siteUserEmail.cgi?forwardaddr=$forwardaddr >> &aliases=$aliases&vacationmode=$vacationmode&vacationmsg=$vacationmsg >> &name=$name&group=$group&page=$page"; >> exec($cmd); >> ?> >> -- >> Best regards, >> rdkurth mailto:[EMAIL PROTECTED] >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php -- Best regards, rdkurthmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: HTML E-mails
on 22/07/02 6:40 AM, Richard Lynch ([EMAIL PROTECTED]) wrote: > But, if they still insist on it, one answer, as I already said, lies here: > > http://phpclasses.org/ > > I'm sure there are a zillion other solutions, that just happens to be one I > know of. > > Why it takes a few thousand people on this list to search this out for you, > when it's readily find-able in Google, or at least in a very brief search > starting at http://php.net/links.php is also beyond my comprehension. Hang on -- I already know how to do HTML mail -- was defending the OP!! > Actually, though, when my clients insist on HTML email, I just tell them: > "No. If you want that feature, you'll have to hire somebody else to do it. > I've already explained why." I don't think I've lost a single client that > way -- Every one of them has re-considered my advice, and outright refusal, > and decided maybe I *do* know what the hell I'm talking about. YMMV. :) >>> It also doesn't add anything. Pretty colours and flashing lights make >>> it harder to read email, and even if you just restrict yourself to basic >>> document formatting, well, is it *that* important that your text is >>> shown as strong emphasis rather than *strong emphasis*? >> >> >> Following this same logic, should we all just use formatted green text >> on a black background? > > Following your logic, should we install HUDs (Heads Up Display) *right* > *now* in cars rolling off the manufacturing line of Detroit? > > No, of course not. > > Your average driver isn't trained to use them, and probably won't be trained > to use them in any reasonable time frame. We were all trained to cook in microwaves pretty quick smart -- an extremely different way of cooking. Not quite the same as a plain formatted email and one with a little bit of layout, clarity and visual hierarchy. > Similarly, your average email client, and average email user, are clearly > *NOT* ready for HTML email. You only have to look at the spread of stupid > email viruses to understand this *FACT*. Yup -- couldn't agree more. > Maybe, some day, with some reasonable effort on the part of an > organization/company that actually understands email, HTML and *SECURITY*, > there might actually *BE* a decent email client that can handle HTML-email, > and we might even have an "information superhighway" (LOL) capable of > handling the load that imposes across the board. Today is not that day. Agree totally. > A web-page is *NOT* an email. > > More importantly, an email is *NOT* a web-page. Correct. An email is a communication medium. And long term, people are going to expect that email can have simular simple visual cues, formatting and layout that they can achieve as "second nature" in such shite as M$ Word. > If you want me to look at your damn pretty colors and junky graphics, send > me an email with the link. > > If I want to waste my time downloading all that crap, I'll click. If not, > buh-bye. > > If you want to insist on sending me inappropriate content for the selected > medium, you'll get what you deserve -- I will delete your email without even > looking at it, much less with a chance that I'll be interested enough to > visit your web-site. I am not alone in this behaviour. Okay, I agree with all this, but there's definitely a mix-up here: *I* don't want to send HTML email. I hate it, never send it, don't like receiving it, don't run any lists that support it, and always attempt to subscribe to mailing lists as a text-only reader. However, I do believe HTML mail (or *some* form of formatting) has a place, and in the right hands (impossible, I know), can be useful with minimal burden, and the original poster was well within their rights to ask how it was done, because realistically, they may have to achieve it. It's not truly you place or mine to dictate to them how evil it is -- just warn them as much as possible. Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submitting to cgi script
In your example you are using the method of POST to pass the form data to the cgi script. However, when you pass the data to the cgi script from the php script you are using the GET method to pass the data. Check and see if the cgi can accept with METHOD="GET" .: B i g D o g :. - Original Message - From: <[EMAIL PROTECTED]> To: "php-general" <[EMAIL PROTECTED]> Sent: Sunday, July 21, 2002 5:46 PM Subject: [PHP] Submitting to cgi script > How can I do this > > I have a form that I want to submit to a second php script that in turn > submits to a cgi script but I can not get it to work. If I submit > from the form to the cgi script it works just fine. But there are > something that I need to do with the data besides submitting to the > cgi script. Could you look at the sample code below and see if I am > doing something wrong. I hope this makes sense I am not quit sure how > to ask what I want to know > If I was submitting directly to the cgi script the form action would > look like this > > > > > > > > > > > > > > > > > The siteUserEmail.php file > $cmd="/cgi-bin/siteUserEmail/siteUserEmail.cgi?forwardaddr=$forwardaddr > &aliases=$aliases&vacationmode=$vacationmode&vacationmsg=$vacationmsg > &name=$name&group=$group&page=$page"; > exec($cmd); > ?> > -- > Best regards, > rdkurth mailto:[EMAIL PROTECTED] > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: if $char == "any form of white space"
If you want to use ereg just [:space:] ... I'm not too sure about what to do with the Perl one. "Justin French" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > Is this the best way to check if a $char is ANY FORM OF WHITESPACE (space, > \t, \r, \n, etc etc)? > > > if(preg_match('/\s/', $char)) > { > ... > } > > ?? > > > Thanks > Justin > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] No text in form submission
Create a file with phpinfo() in it. Justin on 22/07/02 6:08 AM, Dean Ouellette ([EMAIL PROTECTED]) wrote: > Is there a way to tell, just contacted my host and they do not know, > they said they could look it up Monday when back in office -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Smart ass form
+++--+-+ | expid | devid | devlanguage | devtime | +++--+-+ | 1 | 1 | PHP | less than 1 year | | 2 | 1 | MySQL| less than 1 year | | 3 | 1 | HTML | more than 5 years | ++--++-+ I'll use that as the template: I'll assume that you know how to get the expid and devid in there and I'll just put them in there as numbers. Less than 1 year 5y\">More than 5 years etc ";?> expiddeviddevlangudevtime 11 VALUE="language[]"> 21 VALUE="language[]"> etc... -1 etc.. Now you can access them by (I think) doing something like this: if (!empty($_POST["language"][0])) // (I think that check boxes give "" if they're not checked) if (!empty($_POST["DevSetLang"][0])) // you might consider making a separate "devselect" variable for the text boxes, which will make it easier to check (the array index will work easier) I hope that that helps. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Submitting to cgi script
How can I do this I have a form that I want to submit to a second php script that in turn submits to a cgi script but I can not get it to work. If I submit from the form to the cgi script it works just fine. But there are something that I need to do with the data besides submitting to the cgi script. Could you look at the sample code below and see if I am doing something wrong. I hope this makes sense I am not quit sure how to ask what I want to know If I was submitting directly to the cgi script the form action would look like this > The siteUserEmail.php file -- Best regards, rdkurth mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: To print in PHP
Correct PDF does work and is well supported on Macs and Linux, and just about everywhere I looked. But, for out system, it don't work 'JUST FINE'. After a lot of test we decided it was just too slow for our use. Every system is different, and if you can live with PDF and it works for you, use it. Notice the period after RTF. The part I'm talking about is the printer functions. http://www.php.net/manual/en/ref.printer.php PHP: Printer functions - Manual Richard Lynch wrote: >>decided I didn't want to use the browser to print. Looked at PDF, RTF. I >>liked the printer functions, but they only worked on M$. After looking >> > > Excuse me. > > PDF works JUST FINE not only on Macs, but is also well-supported under > Linux. > > http://php.net/pdflib > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: HTML E-mails
All I add to my headers to make them work are: "MIME-Version: 1.0\r\n" ."Content-type: text/html; charset=iso-8859-1\r\n" ."From: [EMAIL PROTECTED]\r\n" ."Reply-To: $ReplyEmail"); I'm running Outlook Express and that works perfectly. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: HTML E-mails
> So most email programs suck. Consider that Outlook and OE are the two > single most popular mail clients in existance. Then, once you've > stretched out from the foetal position and stopped weeping > uncontrollably, try to educate people about HTML mail :-). Actually I enjoy my Outlook Express... "MIME-Version: 1.0\r\n" ."Content-type: text/html; charset=iso-8859-1\r\n" Is all that I add other than the default headers of From: and Reply (after the MIME ...) and it works for me. Also, not to start a flame war, but you might want to look at http://abcnews.go.com/sections/scitech/TechTV/techtv_hackertargets020719.htm l -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Here's how to fix it
You have to use a FOR or WHILE loop. PHP 3 doesn't supported the foreach loop. You can get identical results by using the examples here: http://www.php.net/manual/en/control-structures.foreach.php "Dean Ouellette" <[EMAIL PROTECTED]> wrote in message 000b01c230f5$7837aa70$9c89adac@yoda">news:000b01c230f5$7837aa70$9c89adac@yoda... > I have a different host I use for my sites, this is one I took over, and > they insist I use this hosting company, friend of an owner. Have been > trying to get to switch but wont. So any ideas on how can get this to > work, no text coming in email > > When I print_r($_POST) what does that do?))) > I get print_r shows everything in the array on the screen. > print_r($_POST) > Fatal error: Call to unsupported or undefined function foreach() in > /www/docs/www.electjoemarine.com/email.php on line 71 > > > PHP Version 3.0.16 > > > > > $MailToAddress = "[EMAIL PROTECTED]"; > > > $MailSubject = "Group volunteer list"; > > > if (!$MailFromAddress) { > > > $MailFromAddress = "$email"; > > > } > > > $Header = ""; > > > $Footer = ""; > > > > > > foreach($_POST as $key => $val) > > > { > > > $val = stripslashes($val); > > > $Message .= "$key = $val\n"; > > > } > > > > What do you see when you: print_r($_POST) I believe it says "Array ( $whatevertheKEYis => $theVALUE, $nextKEY => $nextValue)" on screen for it. Basically, it makes it so you could copy and paste it and create a replica of THAT array. Mostly used for debugging. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: hay
On Sun, 21 Jul 2002, Richard Lynch wrote: ++>I don't use Classes. How it is possible?:))) I prefer OOP and I use it as much as possible even in PHP ++>> $this=&$GLOBALS["cache"]; ++>I would not expect this to work. ++>PHP is going to finalize and return the class, and you're assignment to ++>$this is meaningless. Oh...you can do everything with this in PHP. $this="text",$this=new B(); and it have a sense - j want to replace an object with another. (but i know that it is not supported by other languages) ++> ++>If you want this to work, you'll have to do more like this: it is some solution... ++> $cache = array(); ++> function new_A(); ++>global $cache; ++> ++>if (!isset($cache['A'])){ ++> $cache['A'] = new A(); ++>} ++>return $cache['A']; ++> } ++>?> ++> ++>In other words, keep your cache "external" to the actual object ++>implementation. ++> ++> -- -- pozdr Rad0s Radek Gajewski [EMAIL PROTECTED] GG:694459 ICQ:110153822 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: include files and global variables
Hmm. Here's how you can make it load EVERYtime the file is included, plain and simply. In the include file, create the function.and the call it after you've made it. To get the other function to work, you might want to try placing the function ABOVE checkMaster(); (you should probably simply put that in the same file, but above it). functions.php I have the feeling that the problem with the session variable is that you're calling it before anything has been done to define it in the main page, so it is null when you check it. Try debugging it with echo statements here and there that call out variables so that you know they're defined correctly. Also, turn on "error_reporting(E_ALL);" (you can simply call it at the top of the page--first thing). That will tell you when variables are used if they're null and other errors that aren't fatal, but might cause problems. "Jon Wyatt" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > I have some pages which include a number of files. > In one of the include files I have a function which I wish to be executed > everytime the include file is loaded. > > Therefore I place the function name in the include file at the top. > > However, this function uses a session variable to decide whether to call > another function and it appears that this variable is not being carried > across. For example, the start of the include file might look like this:- > > > > checkMaster(); > > > function checkMaster() > { > global $master_session; > if ($master_session[db_host]) > { > connectToDB(); > } > } > > > function connectToDB() > { > ... > > > > The master_session variable is not set and hence connectToDB is never > called. > If I place the checkMaster code in each page that includes this file then it > all works fine. How do I get round this? > > Thanks. > > jon. > > Better than having your body rubbed vigorously with a cheese grater. > http://www.samuri.co.uk. > > > _ > MSN Photos is the easiest way to share and print your photos: > http://photos.msn.com/support/worldwide.aspx > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] No text in form submission
> I have a different host I use for my sites, this is one I took over, and > they insist I use this hosting company, friend of an owner. Have been > trying to get to switch but wont. So any ideas on how can get this to > work, no text coming in email > > When I print_r($_POST) what does that do?))) > I get $_POST doesn't exist in PHP 3. Use $HTTP_POST_VARS. Also check your settings of track_vars and register_globals in PHP.ini (or your phpinfo() page). Check the manual on what each of those settings mean and how they affect your script, too. http://www.php.net/manual/en/configuration.php ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Problem with sessions.(Again Sorry :)
> From: Richard Lynch [mailto:[EMAIL PROTECTED]] > > >> Don't cram things into $_SESSION. Use this: > >> > >> session_register('uid'); > >> global $uid; > >> $uid = $uinfo[0]; > > > >With PHP 4.2, you don't have to use session_register. You can do it > >exactly like the OP is. I do it all the time. Whether that is a > >"feature" or a bug, I don't know. > > It happens to work because that happens to be how Sessions are implemented > this week. > > > Programming 101: > Rule #27: Relying on implementation minutia instead of documented > functions > is just a Bad Idea (tm). > > > Use the functions that are documented to work. Anything else is a HACK > and > subject to break without notice. > > In PHP 4.3 or 5.0 or 7.3.1, when it *DOESN'T* work anymore and you have a > zillion lines of code cramming junk into $_SESSION scattered all through > your application, don't come crying to me. :-) Always a good method to follow, but the manual says you can use the $_SESSION method I gave. There is no need to use session_register() or the like. I would imagine that the older method would be depreciated eventually. It's a whole lot easier to just treat sessions like a variable without that whole register/unregister stuff. The manual actually cautions against using session_register/unregister if register_globals is OFF. http://www.php.net/manual/en/ref.session.php ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Drop Down Box Question
> -Original Message- > From: Richard Lynch [mailto:[EMAIL PROTECTED]] > Sent: Sunday, July 21, 2002 5:06 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Drop Down Box Question > > >> Hello, > >> Is there a way to handle data gathered from a drop down menu that > >allows > >> multiple selections using PHP? > > > >Of course. Name your select box as an array, and include the 'multiple' > >keyword. > > > > > > > >Then you'll have an array on your processing page that holds all of the > >values that were selected. $_POST['something'][]. Note that it starts at > >zero. > > > >You can use count($_POST['something']) to see how many were selected, > >etc... > > If you need specific IDs or something from the OPTIONs presented, other > than > the text between the tags, you can even use the VALUE= attribute to pass > around data so that $_POST['something'] doesn't just start at 0 and count > up: > >while (list($id, $name) = each($ineeddatacaptain)){ > echo "$id: $name\n"; > } > ?> > > Captain Kirk > Spock > McCoy > Scotty > Sulu > Uhura > Chekov > > > If you click on Spock, instead of just 0, Spock, you'll get 2, Spock -- > You > get his ID number as well as his name. That's confusing. There's no way to get "Spock" from the code. You only get the number in the value attribute. If the user were to choose Spock and McCoy, then you'd have: $_POST['ineeddatacaptain'][0] --> 2 $_POST['ineeddatacaptain'][1] --> 4 It's up to the programmer to associate 2 with Spock, and 4 with McCoy. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: No text in form submission
>Been working on trying to get form submission to work. > >Now have it so when click enter it e-mails me, but there is no text >subitted in the e-mail > >Any ideas? >$MailToAddress = "[EMAIL PROTECTED]"; >$MailSubject = "Group volunteer list"; >if (!$MailFromAddress) { >$MailFromAddress = "$email"; >} >$Header = ""; >$Footer = ""; > var_dump($_POST); reset($_POST); echo "_POST isset? ", isset($_POST), "\n"; >foreach($_POST as $key => $val) >{ >$val = stripslashes($val); >$Message .= "$key = $val\n"; >} > >if ($Header) { >$Message = $Header."\n\n".$Message; >} > >if ($Footer) { >$Message .= "\n\n".$Footer; >} > >mail($MailToAddress, $MailSubject, $Message, "From: >{$MailFromAddress}"); ?> > -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: web-based survey form design : PHP & MySQL
> I am newbie in PHP. I am just learning the PHP >through tutorials and this mailing list. I have very >first goal of doing one project "Design web-based >survey" using PHP and MySQL. I would appreciate if >anybody give me some links that help to develope such >skills. Search the code archives linked from http://php.net/links.php You will doubtless find a *LOT* of web-based Survey packages in varying stages of complexity and completion within them. Here, however, is yet another free one to get you started: # Change your include_path in .htaccess or php.ini PHP can find that file. $answer = substr($answer, 0, 1); $answer = strtolower($answer); if ($answer != 'y'){ echo "Wrong answer.\n"; } $query = "insert into answers (answer) value('$answer')"; $insert = mysql_query($query, $connection) or error_log(mysql_error()); if (!$insert){ "Unable to record your answer. Ask the site administrator to read his Apache error_log.\n"; } else{ echo "Thanks for filling out our Survey!\n"; } if (!isset($answer) || $answer != 'y'){ ?> METHOD=POST> Should I have searched the archives and code repositories before posting to PHP-General? Yes No PS The logical error some readers will think they have spotted on lines 10 and 21 is not, in fact, a bug at all. :-) -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-DB] PHP4 Not Seeing PostgreSQL 7.2
>if the install directory /usr/local/pgql or /usr/local/pgsql > >What does your phpinfo() give for postgres? > > >> By the way, I have set the LD_LIBRARY_PATH and I have included >> /usr/local/pgsql/lib >> path in /etc/ld.so.conf. You should also do "ld_config" I think... I do that any time I muck with /etc/ld.so.conf >> >> Compiled PHP4 as follows: >> ./configure --enable-track-vars --with-gettext --enable-force-cgi-redirect >> --with-apache=../apache_1.3.26 --without-mysql >> --with-pgsql=/usr/local/pgql >> >> PHP code is working with Apache because other things work. Just that >> pg_connect() is always 'unknown function'. Aha! That means that even though you *ASKED* configure to give you --with-pgsql=/usr/local/pgql it didn't work. ./configure was able to stumble through, but it did give you a warning message about it, somewhere in that mass that scrolled by. You could look in config.log, only it doesn't contain the "Yes/No" and other error output, so it only shows that ./configure *tried* to get PostgreSQL, not what actually happened. (Gr.) You could try reading config.cache, if your brain is twisted enough. Mine isn't. :-( Re-do the ./configure, only this time like this: ./configure ... 2>&1 > configure.output & Or is that '2&>1' ? I never really did grok the combination of > with & and how it turns into "shove stderr output in with stdout"... Then, you can use: tail -f configure.output to examine configure.output as it is happening, but also use vi or less or grep to look at it again later. Don't ask me why ./configure itself doesn't give you the info you need in config.log -- I sure don't understand it. Anyway, for some reason, PostgreSQL never got compiled into PHP, which is why there is no function named "pg_connect" First Guess: /usr/local/pgql should be /usr/local/pgsql or /usr/local/psql or something other than /usr/local/pgql Also don't ask me to explain why configure would just continue on and not give a fatal error when it can't give you what you asked for... As near as I can figure, if what you asked for is what it would have done by default, but it still can't do it, it will just keep going... That's pretty silly, if you ask me. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: documentation to php 5
>the most difference between php 4 and php 5 is the new zend engine - right? Don't know. The changes are documented in the ChangeLog available in CVS at http://cvs.php.net and on pages linked from the home page of PHP http://php.net/ I reckon you can read them as well as I can. >As far as i know (Alexey Zakhlestine told me) does the new php 4.3 release >already include zend engine 2. My question is now: >Will there be a completly new documentation for php 5 (or the new engine)? >Or will the new functions and the new syntax rules just be added to the >regular doc? When do you think will the completed doc be online? > >When will php 5 be released? Past upgrades have remained largely backwards-compatible, and I expect PHP 4.3/5 to also do so. There will always be exceptions for various reasons. In the past, upgrades to PHP have simply altered the existing on-line manual. I would expect that the next version would also do so, but only the PHP Documentation team would know for sure. There will never, ever, be a completed documentation for PHP on-line, or anywhere else :-) Generally, the PHP docs "lag" behind the actual functions by a few weeks or so, depending on who wrote the functions, and how many people use/need those functions. Functions with few users and/or more complicated interfaces may lag woefully behind average. Feel free to join the documentation team and reduce this lag time. :-) I trolled for answers to the "when will PHP 5 happen" in the PHP-Dev list recently. Use the archives. Search for "tea leaves" to find the thread. YMMV. Note that all the answers, if any were public, were "off the record" -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Drop Down Box Question
>> Hello, >> Is there a way to handle data gathered from a drop down menu that >allows >> multiple selections using PHP? > >Of course. Name your select box as an array, and include the 'multiple' >keyword. > > > >Then you'll have an array on your processing page that holds all of the >values that were selected. $_POST['something'][]. Note that it starts at >zero. > >You can use count($_POST['something']) to see how many were selected, >etc... If you need specific IDs or something from the OPTIONs presented, other than the text between the tags, you can even use the VALUE= attribute to pass around data so that $_POST['something'] doesn't just start at 0 and count up: \n"; } ?> Captain Kirk Spock McCoy Scotty Sulu Uhura Chekov If you click on Spock, instead of just 0, Spock, you'll get 2, Spock -- You get his ID number as well as his name. This is extremely convenient. And you sure can't do that in ASP easily :-) -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: get a list of clients with PHP
>Hello, > >there is a problem in a enterprise LAN: >On each PC runs a Client, which waits at a haven for messages. >With fsockopen(); messages are sent to all existing Clients. >Functioned only, if one knows, the which Clients are switched on. >If the Script meets a IP, whose PC is switched off, it dies. >All following IP's receives no more message. > >My problem: >How can I receive a list of the PC's switched on at present with PHP? >System calls are not a genuine solution. >The Script is not only to work under Linux. I don't think fsockopen's failure to open a socket will "kill" a PHP script... Show us source code for that bit, and the loop you use to visit all the PC's... Also be sure you are setting a reasonable time-out on the fsockopen (http://php.net/fsockopen) as well as on PHP itself (http://php.net/set_time_limit) Try adding as much error-checking code as you can around the fsockopen functions calls, and log the stuff to a file or something where you can get it. http://php.net/error_log -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Apache Gurus
>Hi. >Sorry for this (ot) message, the apache mailing list isn't very helpful. > >I need some information on mod_rewrite and mod_vhost_alias. > >My server doesn't want to detect subdomains. mod_rewrite Rule #1. Use that EngineLog or whatever it is to crank up your logging of mod_rewrite as high as it will go. Never mind the warning in the Apache manual about dire consequences to performance right now -- You'll *NEVER* intuit what the hell mod_rewrite is doing without that log. Trust me on this one :-) Lost a lot of hair before I got brave enough to ignore that particular warning in the manual. EXCEPTION: You're *not* doing this to a *LIVE* *PRODUCTION* server, right?!!! Don't know squat about the mod_vhost_alias, or how it might be involved with the rewrite bit. You are reading everything you can find about these at http://apache.org, right? Very nice web-site, once you figure out the format of the documentation. If your head is spinning, study the documentation on the simplist directive you think you *completely* understand, and then work with one that you think you understand that's a bit more similar to the one that's giving you problems, and then go back to your problem directive... Seeing the documentation "in context" with other directives often makes clear a single line that otherwise is just gibberish :-) YMMV. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: newbie form problem
>$MailToAddress = "[EMAIL PROTECTED]"; >$MailSubject = "Group volunteer list"; >if (!$MailFromAddress) { This should probably be: if (!isset($MailFromAddress) || !$MailFromAddress)){ Hard to tell if this is cut out from a bigger script or what... You also have a very unusual (but at least consistent) indenting style for { and }... >$MailFromAddress = "$email"; >} >$Header = ""; >$Footer = ""; >?> > > > if (!is_array($HTTP_POST_VARS)) >return; You may want to use isset() first here as well, and to check for the new $_POST array. >reset($HTTP_POST_VARS); >while(list($key, $val) = each($HTTP_POST_VARS)) { >$GLOBALS[$key] = $val; It would be better to use $$key = $val instead of stuffing things into $GLOBALS. Variable variables are a documented feature. Assigning stuff into $GLOBALS is not. Don't think it will ever really break, but it's always safer to use documented features. >$val=stripslashes($val); > >$Message .= "$key = $val\n"; To be strictly RFC-compliant, use \r\n, not just \n >} > >if ($Header) { >$Message = $Header."\n\n".$Message; >} > >if ($Footer) { >$Message .= "\n\n".$Footer; >} > >mail( "$MailToAddress", "$MailSubject", "$Message", "From: >$MailFromAddress"); The quotes on the first three arguments are silly -- not harmful, just silly. You're forcing PHP to create another string to hold the strings you already have. A trifle wasteful, I suppose, but mostly just silly. Also use Reply-to: as well as From: if you want maximum number of email clients to do the right thing. You should be getting and checking the return value of the mail() function: $success = mail($MailToAddress, $MailSubject, $Message, "From: $MailFromAddress\r\nReply-to: $MailFromAddress); if ($success){ echo "Mail successfully queued.\n"; } else{ echo "Unable to queue email.\n"; } This last part may not help you figure out *WHY* the email isn't arriving, but you can at least pin-point the problem to either *BEFORE* PHP ever gets the email shoved into sendmail's queue, or after sendmail got the email. If this prints "Unable to queue email" you know PHP is not talking nice enough to sendmail to get the email into sendmail's queue. If it claims the email was queued, you need to look at sendmail and see why it has decided not to send the email after all. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: HTML E-mails
>Subsequently, if my client wants HTML email, and they aren't swayed by >advice to the contrary, then I have to deliver it, and deliver it within a >sufficient timeframe, with minimal bugs and hiccups. > >Hence I (he/she) need to know how it's done. If your pointy-haired-boss or equally clue-challenged client *INSISTS* on HTML email, then you clearly haven't explained to them: Many of your recipients will delete it without reading. But, if they still insist on it, one answer, as I already said, lies here: http://phpclasses.org/ I'm sure there are a zillion other solutions, that just happens to be one I know of. Why it takes a few thousand people on this list to search this out for you, when it's readily find-able in Google, or at least in a very brief search starting at http://php.net/links.php is also beyond my comprehension. Actually, though, when my clients insist on HTML email, I just tell them: "No. If you want that feature, you'll have to hire somebody else to do it. I've already explained why." I don't think I've lost a single client that way -- Every one of them has re-considered my advice, and outright refusal, and decided maybe I *do* know what the hell I'm talking about. YMMV. >> It also doesn't add anything. Pretty colours and flashing lights make >> it harder to read email, and even if you just restrict yourself to basic >> document formatting, well, is it *that* important that your text is >> shown as strong emphasis rather than *strong emphasis*? > > >Following this same logic, should we all just use formatted green text >on a black background? Following your logic, should we install HUDs (Heads Up Display) *right* *now* in cars rolling off the manufacturing line of Detroit? No, of course not. Your average driver isn't trained to use them, and probably won't be trained to use them in any reasonable time frame. Similarly, your average email client, and average email user, are clearly *NOT* ready for HTML email. You only have to look at the spread of stupid email viruses to understand this *FACT*. Maybe, some day, with some reasonable effort on the part of an organization/company that actually understands email, HTML and *SECURITY*, there might actually *BE* a decent email client that can handle HTML-email, and we might even have an "information superhighway" (LOL) capable of handling the load that imposes across the board. Today is not that day. >If formatting doesn't add anything, and if pretty colours make things harder >to read, and plain text-isms like *emphasis* are okay, then why have you >bothered to learn HTML to a "high standard", and chosen to use colors, bold >text, and other *simple* GUI tricks on your own webpage? A web-page is *NOT* an email. More importantly, an email is *NOT* a web-page. If you want me to look at your damn pretty colors and junky graphics, send me an email with the link. If I want to waste my time downloading all that crap, I'll click. If not, buh-bye. If you want to insist on sending me inappropriate content for the selected medium, you'll get what you deserve -- I will delete your email without even looking at it, much less with a chance that I'll be interested enough to visit your web-site. I am not alone in this behaviour. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: To print in PHP
>decided I didn't want to use the browser to print. Looked at PDF, RTF. I >liked the printer functions, but they only worked on M$. After looking Excuse me. PDF works JUST FINE not only on Macs, but is also well-supported under Linux. http://php.net/pdflib -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Redirect Question
>Instead of outputting a header to redirect the browser would it be safer to >use the meta-refresh tag? > >The reason I ask is because I heard that some versions of IE have trouble >with the header There are probable even more browsers that can't handle the META tag... Which versions of IE is somebody claiming can't handle a Location: header? Cuz, like, even IE *CAN'T* be that broken, can it? -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Smart ass form
>Hi all. I have this form with some dynamically made fields. One of them >fields is truly making me nuts. The thing is, I have a table in which I >store the user id, the development language he/she uses and the time >he/she has been using it. Something like this: > >+++--+-+ >| expid | devid | devlanguage | devtime | >+++--+-+ >| 1 | 1 | PHP | less than 1 year | >| 2 | 1 | MySQL| less than 1 year | >| 3 | 1 | HTML | more than 5 years | >++--++-+ > >Now, in the HTML form I want to display each language along with a >checkbox for selection and a dropdown with a list of time periods. Some >tough me in this list about naming the form fields like language[] in Don't use just language[] Use language[$devid] >order to create an array and use it when it was not empty. Fine, the >thing is that I also want to display a list of some 3 blank textboxes >along with time periods drop downs so anyone who knows another language >can add it to the list... the questions are as follows: > >1) What would be the best approach to do this and how should I >call all the checkboxes, textfields and drop downs? Same answer. Use some reasonable variable name, with [$devid] after it. >2) How can I manage them after the form was submitted? while (list($dev_id, $lang) = each($language)){ } -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: write some text over image
>how can I write some text on the left corner of the image? http://php.net/image -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: need help exec command
>Hi Gurus, > >I am using PHP 4.1.1, Postgresql 7.2 and Perl 5.6.0 on Linux. > >I want to execute a perl script throgh a PHP, which will take backup of the >database after submit button on the PHP is clicked. > >I am using exec command, but as PHP runs as "nobody" user, it does not have >access to Postgres database. So it creates a file of 0 byte. > >Can anybody tell me how to change user for execution of a particular PHP, or >is there any other alternative. > >Thanking you in anticipation. If you're going to do this from a web-page, you will need some kind of shell script with 'sudo' (man sudo) permissions to do what needs to be done. *OR* add a new mime-type to your httpd.conf that runs PHP as a CGI as the 'postgres' user which *does* have permission to do this. *OR* alter the permissions of pg_dump to be world-executable, and of the directory where the files are stored as well. *OR* just pass in the username/password using -U to pg_dump (man pg_dump) *OR* ... There's a zillion ways to skin this cat, but which is least risky (or even possible) depends on who can access the box, who can access the web page, and whether or not you have root access on the box. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Problem with sessions.(Again Sorry :)
>> Don't cram things into $_SESSION. Use this: >> >> session_register('uid'); >> global $uid; >> $uid = $uinfo[0]; > >With PHP 4.2, you don't have to use session_register. You can do it >exactly like the OP is. I do it all the time. Whether that is a >"feature" or a bug, I don't know. It happens to work because that happens to be how Sessions are implemented this week. Programming 101: Rule #27: Relying on implementation minutia instead of documented functions is just a Bad Idea (tm). Use the functions that are documented to work. Anything else is a HACK and subject to break without notice. In PHP 4.3 or 5.0 or 7.3.1, when it *DOESN'T* work anymore and you have a zillion lines of code cramming junk into $_SESSION scattered all through your application, don't come crying to me. :-) -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: hay
>Sorry that I write your prov address but it seems to me that you >are quite like guru in PHP so I would like to share with you with >my problem and i would be glad to hear from you where and what >kind of problem there is. I don't use Classes. > $this=&$GLOBALS["cache"]; I would not expect this to work. PHP is going to finalize and return the class, and you're assignment to $this is meaningless. If you want this to work, you'll have to do more like this: In other words, keep your cache "external" to the actual object implementation. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] write some text over image
http://www.hotscripts.com/PHP/Tips_and_Tutorials/Image_Manipulation/ - Original Message - From: "Alawi" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, July 21, 2002 4:40 PM Subject: [PHP] write some text over image > Hi > how can I write some text on the left corner of the image? > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] include files and global variables
I have some pages which include a number of files. In one of the include files I have a function which I wish to be executed everytime the include file is loaded. Therefore I place the function name in the include file at the top. However, this function uses a session variable to decide whether to call another function and it appears that this variable is not being carried across. For example, the start of the include file might look like this:- http://www.samuri.co.uk. _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] No text in form submission
I have a different host I use for my sites, this is one I took over, and they insist I use this hosting company, friend of an owner. Have been trying to get to switch but wont. So any ideas on how can get this to work, no text coming in email When I print_r($_POST) what does that do?))) I get print_r($_POST) Fatal error: Call to unsupported or undefined function foreach() in /www/docs/www.electjoemarine.com/email.php on line 71 > PHP Version 3.0.16 > > > $MailToAddress = "[EMAIL PROTECTED]"; > > $MailSubject = "Group volunteer list"; > > if (!$MailFromAddress) { > > $MailFromAddress = "$email"; > > } > > $Header = ""; > > $Footer = ""; > > > > foreach($_POST as $key => $val) > > { > > $val = stripslashes($val); > > $Message .= "$key = $val\n"; > > } > > What do you see when you: print_r($_POST) > > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > > /* > regex are more than some crappy posix thing > they are an art form > > - Marc Zealey on #kernelnewbies > */ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] No text in form submission
Tell your web hosting company to do an upgrade...or find a different hosting co... .: B i g D o g :. - Original Message - From: "Dean Ouellette" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, July 21, 2002 2:20 PM Subject: RE: [PHP] No text in form submission > PHP Version 3.0.16 > > -Original Message- > From: Jason Wong [mailto:[EMAIL PROTECTED]] > Sent: Sunday, July 21, 2002 2:26 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] No text in form submission > > On Monday 22 July 2002 01:52, Dean Ouellette wrote: > > Been working on trying to get form submission to work. > > > > Now have it so when click enter it e-mails me, but there is no text > > subitted in the e-mail > > What version of php are you using? > > > > $MailToAddress = "[EMAIL PROTECTED]"; > > $MailSubject = "Group volunteer list"; > > if (!$MailFromAddress) { > > $MailFromAddress = "$email"; > > } > > $Header = ""; > > $Footer = ""; > > > > foreach($_POST as $key => $val) > > { > > $val = stripslashes($val); > > $Message .= "$key = $val\n"; > > } > > What do you see when you: print_r($_POST) > > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > > /* > regex are more than some crappy posix thing > they are an art form > > - Marc Zealey on #kernelnewbies > */ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] No text in form submission
PHP Version 3.0.16 -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 21, 2002 2:26 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] No text in form submission On Monday 22 July 2002 01:52, Dean Ouellette wrote: > Been working on trying to get form submission to work. > > Now have it so when click enter it e-mails me, but there is no text > subitted in the e-mail What version of php are you using? > $MailToAddress = "[EMAIL PROTECTED]"; > $MailSubject = "Group volunteer list"; > if (!$MailFromAddress) { > $MailFromAddress = "$email"; > } > $Header = ""; > $Footer = ""; > > foreach($_POST as $key => $val) > { > $val = stripslashes($val); > $Message .= "$key = $val\n"; > } What do you see when you: print_r($_POST) -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* regex are more than some crappy posix thing they are an art form - Marc Zealey on #kernelnewbies */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] No text in form submission
Create a new php file and just put the following in it: should get you all the info you need Cheers Lee - Original Message - From: "Dean Ouellette" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, July 21, 2002 9:08 PM Subject: RE: [PHP] No text in form submission > Is there a way to tell, just contacted my host and they do not know, > they said they could look it up Monday when back in office > > -Original Message- > From: Jason Wong [mailto:[EMAIL PROTECTED]] > Sent: Sunday, July 21, 2002 2:26 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] No text in form submission > > On Monday 22 July 2002 01:52, Dean Ouellette wrote: > > Been working on trying to get form submission to work. > > > > Now have it so when click enter it e-mails me, but there is no text > > subitted in the e-mail > > What version of php are you using? > > > > $MailToAddress = "[EMAIL PROTECTED]"; > > $MailSubject = "Group volunteer list"; > > if (!$MailFromAddress) { > > $MailFromAddress = "$email"; > > } > > $Header = ""; > > $Footer = ""; > > > > foreach($_POST as $key => $val) > > { > > $val = stripslashes($val); > > $Message .= "$key = $val\n"; > > } > > What do you see when you: print_r($_POST) > > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > > /* > regex are more than some crappy posix thing > they are an art form > > - Marc Zealey on #kernelnewbies > */ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] No text in form submission
Is there a way to tell, just contacted my host and they do not know, they said they could look it up Monday when back in office -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 21, 2002 2:26 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] No text in form submission On Monday 22 July 2002 01:52, Dean Ouellette wrote: > Been working on trying to get form submission to work. > > Now have it so when click enter it e-mails me, but there is no text > subitted in the e-mail What version of php are you using? > $MailToAddress = "[EMAIL PROTECTED]"; > $MailSubject = "Group volunteer list"; > if (!$MailFromAddress) { > $MailFromAddress = "$email"; > } > $Header = ""; > $Footer = ""; > > foreach($_POST as $key => $val) > { > $val = stripslashes($val); > $Message .= "$key = $val\n"; > } What do you see when you: print_r($_POST) -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* regex are more than some crappy posix thing they are an art form - Marc Zealey on #kernelnewbies */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] web-based survey form design : PHP & MySQL
Hi all, I am newbie in PHP. I am just learning the PHP through tutorials and this mailing list. I have very first goal of doing one project "Design web-based survey" using PHP and MySQL. I would appreciate if anybody give me some links that help to develope such skills. Thanks and sorry for asking a lazy question. Dipendra __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php