[PHP] [php] graph with two or more input display
Hi All, Does anyone know of any php grahp that will enable you to show/analyse more than one inputs like price versus time? -- Best Wishes Andrew Williams willandy.co.uk
RE: [PHP] How can I detect an exception without using try/catch?
http://uk2.php.net/set_exception_handler http://uk2.php.net/manual/en/function.set-error-handler.php > Date: Thu, 23 Apr 2009 12:19:30 -0400 > From: wmo...@potentialtech.com > To: php-general@lists.php.net > Subject: [PHP] How can I detect an exception without using try/catch? > > > Specifically, the __destruct() method of certain objects will be > called if an object goes out of scope due to an exception. Since > the __destruct() method didn't call the code that caused the > exception, it can't catch it. > > I need the __destruct() method to behave differently if it's > called while an exception is in progress than if it's called > simply because the object is unset. > > Searches of the docs has yet to turn up anything and Google isn't > helping. Anyone have any pointers? > > -- > Bill Moran > http://www.potentialtech.com > http://people.collaborativefusion.com/~wmoran/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > _ Drag n’ drop—Get easy photo sharing with Windows Live™ Photos. http://www.microsoft.com/windows/windowslive/products/photos.aspx
[PHP] [php] embedding excel chart/graph
* I have been to see how to embed excel charts and graph to php code. does any knows how* willandy.co.uk
Re: [PHP] [php] embedding excel chart/graph
y specifically an excel chart ? see http://teethgrinder.co.uk/open-flash-chart/ Kranthi. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [php] graph with two or more input display
http://pchart.sourceforge.net/documentation.php?topic=exemple8 but may be a 2-D graph will be more simpler to understand http://teethgrinder.co.uk/open-flash-chart/gallery-bar-4.php Kranthi. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [php] graph with two or more input display
2009/4/24 Andrew Williams : > Hi All, > > Does anyone know of any php grahp that will enable you to show/analyse more > than one inputs like price versus time? > Hi Andrew, we're using PEAR:Image_graph here and it's good for our needs. Maybe you should check it out. PEAR:Image_graph http://pear.veggerby.dk/ Regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: how to determine if a mysql query returns an empty set?
Is there a way to determine if a mysql query returns an empty set? I am selecting 10 results at a time with a limit statement and need to know when i've ran out of rows. I've only got 2 rows in the database, so when I start with row 10, it returns an empty set. I have the following code: //running this query gives "Empty set (0.00 sec)" in mysql console. $get_requests = "select form_id, full_name, email, phone, division, location, date_format(time_of_request, '%m-%d-%Y %r') as time_of_request, contact_time, problem, accepted_by, date_format(accepted_time, '%m-%d-%Y %r') as accepted_time, resolution, date_format(resolution_time, '%m-%d-%Y %r') as resolution_time from form where ((stage = 'Closed') && (email = 'awilliam' )) order by resolution_time limit 10 , 10" //checks to see if it returns nothing, then print that you are at the end of the results if (!$mysqli_get_requests = mysqli_query($mysqli,$get_requests)) { echo "You have reached the end of the results. Please press the back button. "; exit; } but that doesn't work, because I guess an empty set is not false, 0, or NULL? Hello, Something better than *_num_rows() : try a do...while loop : $res = mysqli_result($sql); if ($data = mysqli_fetch_*($res)) { // At least one row was found do { // } while ($data = mysqli_fetch_row); } else { // 0 rows } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How can I detect an exception without using try/catch?
> > > What would be nice is a function like get_current_exception() that > would either return the current exception object, or return false > if there is no exception. > > I guess the try catch pair works like this: you try to run a part of script which you know it could be under errors You tell your boy to play(but a bulley comes often): try { Go boy try to play } catch (street_bulley_came) { do not cry or dont swear at the bulley dont be afraid } Lenin www.twitter.com/nine_L
Re: [PHP] MySQL, MD5 and SHA1
Jan G.B. wrote: > 2009/4/21 Per Jessen : >> Jan G.B. wrote: >> >>> A web application that uses an external db server would be quite ... >>> uhm... slow! Anyone did this, yet? ;) >> >> Certainly, and it's not slow. It depends entirely on your connection >> to the public internet. >> > > As we're speaking of the internet, it also depends on the route and so > it depends on servers which are not underlying your administration (in > most cases at least). > Having several servers with gigabit internet access also might be more > expensive than a cat6 patch cable and a gigabit nic. So this setup > would be just mad. It's a moot point, but I know for a fact that such a setup can work just fine. I'm surprised you didn't even consider performance requirements when you started making such blanket statements. /Per -- Per Jessen, Zürich (10.7°C) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How can I detect an exception without using try/catch?
2009/4/23 Bill Moran : > > Specifically, the __destruct() method of certain objects will be > called if an object goes out of scope due to an exception. Since > the __destruct() method didn't call the code that caused the > exception, it can't catch it. > > I need the __destruct() method to behave differently if it's > called while an exception is in progress than if it's called > simply because the object is unset. > > Searches of the docs has yet to turn up anything and Google isn't > helping. Anyone have any pointers? As far as I'm aware what you're asking for is not possible. Exception handlers run without any context - check the return value from debug_backtrace() in a catch block to see what I mean. -Stuart -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How can I detect an exception without using try/catch?
Ok, the details of the problem obviously aren't being understood. Let's assume that I explained it poorly and I'll try again. Take the following code (It's complete, cut/paste to see what happens.): running = true; } public function stop() { $this->running = false; } public function __destruct() { if ($this->running) { throw new exception('I have not stopped running yet!'); } } } function fail_horribly() { throw new exception('This is the real error that I want a stack trace from'); } function do_that_thing() { $running = new running(); fail_horribly(); $running->stop(); } try { do_that_thing(); } catch (exception $e) { echo $e->getMessage(); } ?> While putting this together, I discovered lots of interesting behaviour. Depending on exactly where I put the try/catch, there are different things that happen and different errors that occur. It's kinda interesting. The thing is, that none of those errors is the result that I _want_ which is to ignore the fact that $running was unset and just report the error that started everything going wrong. If I could put my fictional function (get_current_exception()) in the __destruct() method, I could detect that an exception was already in progress and avoid throwing another one. -- Bill Moran http://www.potentialtech.com http://people.collaborativefusion.com/~wmoran/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How can I detect an exception without using try/catch?
uhm, I did not read it, you are right ... well, take this code as a joke, OK? getMessage(), "\n"; if($checkSomethingAndEventuallyContinue = true){ $line = $exception->getLine(); $php = explode(PHP_EOL, file_get_contents($exception->getFile())); while($line--) array_shift($php); eval(implode(PHP_EOL, $php)); } } set_exception_handler('exception_handler'); throw new Exception('Uncaught Exception'); echo "Not Executed\n"; ?> > Date: Fri, 24 Apr 2009 07:07:10 -0400 > From: wmo...@potentialtech.com > To: an_...@hotmail.com > CC: php-general@lists.php.net > Subject: Re: [PHP] How can I detect an exception without using try/catch? > > In response to Andrea Giammarchi : > > > > http://uk2.php.net/set_exception_handler > > http://uk2.php.net/manual/en/function.set-error-handler.php > > Thanks for the reply, Andrea. However, you either didn't read my > entire message, or didn't understand it. I can't use either of > those to detect an exception that's already in progress, I can only > use them to catch the exception before the script ends if nothing > else catches it. > > What would be nice is a function like get_current_exception() that > would either return the current exception object, or return false > if there is no exception. > > > > Date: Thu, 23 Apr 2009 12:19:30 -0400 > > > From: wmo...@potentialtech.com > > > To: php-general@lists.php.net > > > Subject: [PHP] How can I detect an exception without using try/catch? > > > > > > > > > Specifically, the __destruct() method of certain objects will be > > > called if an object goes out of scope due to an exception. Since > > > the __destruct() method didn't call the code that caused the > > > exception, it can't catch it. > > > > > > I need the __destruct() method to behave differently if it's > > > called while an exception is in progress than if it's called > > > simply because the object is unset. > > > > > > Searches of the docs has yet to turn up anything and Google isn't > > > helping. Anyone have any pointers? > > > > > > -- > > > Bill Moran > > > http://www.potentialtech.com > > > http://people.collaborativefusion.com/~wmoran/ > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > _ > > Drag n’ drop—Get easy photo sharing with Windows Live™ Photos. > > > > http://www.microsoft.com/windows/windowslive/products/photos.aspx > > > -- > Bill Moran > http://www.potentialtech.com > http://people.collaborativefusion.com/~wmoran/ _ Show them the way! Add maps and directions to your party invites. http://www.microsoft.com/windows/windowslive/products/events.aspx
[PHP] Using scandir() in a Novell Netware Volumen or a Windows Shared Folder
Hi, Im having problems when i try to use the function scandir() in a Novell Netware Volumen or a Windows Shared Folder they both are mapped as a windows network drive, so i suppose i could access them as local drive, but i can't. instead i receive this message: Warning: scandir(R:\) [function.scandir]: failed to open dir: Invalid argument in C:\WebServ\wwwroot\htdocs\index.php on line 3 Warning: scandir() [function.scandir]: (errno 22): Invalid argument in C:\WebServ\wwwroot\htdocs\index.php on line 3 this is the script: i' am logged to novell as a administrator (testing only) if i use scandir() in a local drive it works fine for example scandir("D:\\") so i guess it's not a security problem i have appache server 2.0 installed on a WXP SP3 workstation (only for testing) and a Novell Netware Server v5.0 used as a File Server, PHP 5.0.2 i have read some message posted before on the list, suggesting to go and search in google before asking help to the list. I wish i could do that, i live in Cuba and i DON'T have access to the internet :-(( :-(( :-(( sorry for my english. Saludos, Dedel. --- Red Telematica de Salud - Cuba CNICM - Infomed
Re: [PHP] MySQL -- finding whether there's a transaction started
On 24-Apr-09 03:45, Chris wrote: > I don't think mysql has any way of finding that out. If you're using an > abstraction layer, it's easy enough in code - though rollback's are a > little harder - should they do a complete rollback or just to a savepoint? Thank you for taking the time to sketch that mock-up -- yes, we were also thinking about something similar as a last resort, but I just can't believe you can't simply ask MySQL whether it's going to autocommit the next query or not... Bogdan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MAIL Error
2009/4/22 Daniel Brown : > On Wed, Apr 22, 2009 at 12:31, Jan G.B. wrote: >> I believe that you all should just overread the huge signature. >> You've wasted a lot bandwidth with this discussion about the signature. :-) >> It's not interesting. >> You could have send your pointless replies to the person, skipping the >> mailing list, so that we aren't annoyed by your drivel which is send >> to thousnads of mail servers. > > You still have absolutely no idea of what this community is or was > before you came along and tried to instill your own sanctimonious > attitude and ideals on people. Trust me on this: nothing you ever, > ever say will change people's minds here, Jan. > > Well, if nothing being said here can change peoples mind, then why do people argue on signatures here? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MAIL Error
2009/4/22 tedd : > At 6:31 PM +0200 4/22/09, Jan G.B. wrote: >> >> I believe that you all should just overread the huge signature. >> You've wasted a lot bandwidth with this discussion about the signature. >> :-) >> It's not interesting. >> You could have send your pointless replies to the person, skipping the >> mailing list, so that we aren't annoyed by your drivel which is send >> to thousnads of mail servers. >> >> 2009/4/22 tedd : >>> >>> Second, if they insist on continuing this idiotic practice, then get a >>> different email account for yourself. There are many places where you >>> can >>> get an email account (i.e., gmail, yahoo, etc.) and it's pretty simple >>> to >>> set one up so that you can use it from work. >>> >> >> Some companies will fire you for using private email at work. => VERY GOOD >> TIP. >> >>> Just because your company has idiotic practices doesn't mean that you >>> have >>> to follow suit. >>> >> >> It's idiotic to speak about that crap! >> >> >> thanks for your time. time to get back on topic. > > Jan: > > Thanks for your input and you may be right, but you must also realize that > this list governs itself, right? > > If I get tried of reading the same pointless excessive signature over and > over again and want to comment about it, I will. > Sure, do it. My point was that it seems ineffective to me to argue on such topics at all. But surely you can do whatever you want. Just like ... I or other readers can fill their killfile if such threads come more often. > Your opinion as to IF I should say something, or not, carries little weight. > When you've donated enough time helping others on this list, then perhaps > that will change. Sorry, but that's a bad attitude in my opinion. It's like "No matter how right or wrong you are, I will not listen to you unless you've kissed Johns feet 10 times, like I did." > But for the moment, I think it's best for the OP to check > with his work and see if he can reason with them. If not, I certainly have > no reason to read the same "drivel" again and again. As such, I can skip > questions posted by him -- and who does that hurt? > I for myself would fell in laughter if a collegue comes to my desk, asking to remove network filters or the mandatory signature of our company. But on to your question: I guess it wouldn't hurt at all if you'd skip the reply regarding his signature. :-) > Now if you have a problem with the way we "moderate" this list, then post > your objections and we'll all consider them and adapt what works. So I have reached the limit of "When you've donated enough time", yet? Great. > But as I > see it, refusing to trim excessive signatures is not one that works well on > this list. Remember, we all donate our time AND we choose who we help. > It's clear that you can chose whom to help. But what you actually do here is argueing on some off topic bytes. Surely, after everyone is giving opionions about that, it's gonna be the topic. But not a topic with any conclusions. > Cheers, > > tedd > Bye, Jan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How can I detect an exception without using try/catch?
In response to Andrea Giammarchi : > > http://uk2.php.net/set_exception_handler > http://uk2.php.net/manual/en/function.set-error-handler.php Thanks for the reply, Andrea. However, you either didn't read my entire message, or didn't understand it. I can't use either of those to detect an exception that's already in progress, I can only use them to catch the exception before the script ends if nothing else catches it. What would be nice is a function like get_current_exception() that would either return the current exception object, or return false if there is no exception. > > Date: Thu, 23 Apr 2009 12:19:30 -0400 > > From: wmo...@potentialtech.com > > To: php-general@lists.php.net > > Subject: [PHP] How can I detect an exception without using try/catch? > > > > > > Specifically, the __destruct() method of certain objects will be > > called if an object goes out of scope due to an exception. Since > > the __destruct() method didn't call the code that caused the > > exception, it can't catch it. > > > > I need the __destruct() method to behave differently if it's > > called while an exception is in progress than if it's called > > simply because the object is unset. > > > > Searches of the docs has yet to turn up anything and Google isn't > > helping. Anyone have any pointers? > > > > -- > > Bill Moran > > http://www.potentialtech.com > > http://people.collaborativefusion.com/~wmoran/ > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > _ > Drag n’ drop—Get easy photo sharing with Windows Live™ Photos. > > http://www.microsoft.com/windows/windowslive/products/photos.aspx -- Bill Moran http://www.potentialtech.com http://people.collaborativefusion.com/~wmoran/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiple return statements in a function.
Hi, > your function could be condensed to this: > > function check($a) > { > return is_array($a) ? true : false; > } Or even better, this: function check($a) { return is_array($a); } Not that I'd imagine it makes a great deal of difference. -- Richard Heyes HTML5 graphing: RGraph (www.rgraph.net) PHP mail: RMail (www.phpguru.org/rmail) PHP datagrid: RGrid (www.phpguru.org/rgrid) PHP Template: RTemplate (www.phpguru.org/rtemplate) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Debugging
Understanding that some coders are diametrically opposed to all assistance from debuggers as crutches, I offer this link for the rest of us: http://particletree.com/features/php-quick-profiler/ Mine was pointing to the wrong folder and still has some warnings so I think these guys might have hurried a bit but it still looks awfully cool.
[PHP] Self-Process php forms or not?
Im trying to understand the advantages behind opting by using a Self-Process PHP Form, instead of having a form and then point the action of the form to another .php page. Can anyone point me some resources about this. Why using one instead of another. What are the main advantages? Regards, Márcio
Re: [PHP] Self-Process php forms or not?
I think the main advantage is that if something goes wrong processing the datas, you can show the form again without redirecting again. And if you have to change the behavior of the page, you have to change only one file instead of two. SanTa - Original Message - From: "MEM" To: "'PHP-General List'" Sent: Friday, April 24, 2009 2:34 PM Subject: [PHP] Self-Process php forms or not? I'm trying to understand the advantages behind opting by using a Self-Process PHP Form, instead of having a form and then point the action of the form to another .php page. Can anyone point me some resources about this. Why using one instead of another. What are the main advantages? Regards, Márcio -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Self-Process php forms or not?
So, on your opinion, we can call that method, on some circumstances, a good practice? What about the moto: "let's separate business from presentation?" Thanks once again, Márcio > -Original Message- > From: Sándor Tamás (HostWare Kft.) [mailto:sandorta...@hostware.hu] > Sent: sexta-feira, 24 de Abril de 2009 13:53 > To: 'PHP-General List' > Subject: Re: [PHP] Self-Process php forms or not? > > I think the main advantage is that if something goes wrong processing > the > datas, you can show the form again without redirecting again. > > And if you have to change the behavior of the page, you have to change > only > one file instead of two. > > SanTa -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Unable to send mail from PHP to AT&T e-mail address
From: Chris >>> the ini_set (or you can set the 5th param to the mail() function) is a >> >>> return-path. If the message bounces (recipient's mailbox full, server >>> down, whatever the reason) it gets delivered to that address. They >> serve >>> different purposes. >> >> The dirty little secret that nobody seems to know is that the RFCs >> reserve Return-path for use by the MTA servers. It can be replaced by >> any of them in the routing chain and is used when mail crosses into or >> out of SMTP networks. If you want a return address other than From to >> stick all the way through, you have to use the Reply-to and/or Sender >> headers. > > Emails don't bounce to those addresses though do they? I've always > thought the return-path is where an email is bounced to and reply-to etc > are used by mail clients, not the mta's. The way I read it, the return-path field is used to indicate a gateway where the message entered the current email network. So a bounced message has to be returned to that gateway to get back to the network from whence it came. This is useful where traffic passes into an SMTP network from a network with an older routing mechanism, or vice versa. The intent is to return the bounce to the Sender or From address, in that order. But, since the RFC specifically says the field is reserved for use by the MTAs, it is not proper behavior for an email client to add it to the header. Reply-to is a specific instruction to the recipients client software to insert this address as To when a reply is composed. It is ignored by the MTA. If you don't want bounces to go to the From address, use Sender. It was intended for mailing lists and administrative assistants to send mail on behalf of someone else without having to forge their From address. It's also useful when you have a web site running on a commercial server farm outside your domain that has to send mail that acts like it came from inside that domain. Many border filters will block mail when the From line says it came from within their domain. So the From address can be the web server (it doesn't even have to be a valid address) while Sender indicates the address in the domain where any bounces need to be sent. Bob McConnell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] checkboxes
Lists wrote: > tedd wrote: >> At 4:58 PM -0400 4/23/09, PJ wrote: >>> >>> >>> tedd wrote: >>> >>> > http://php1.net/a/edit-db-demo/ >>> >>> >>> >H I've looked at your demo and, frankly, don't see it >>> working. >>> When I enter names and click on one of the search buttons, I don't get >>> sane results. For instance, entering Johnson in last name and John in >>> first name, I click on search first name and I get an entry from page R >>> for first name John and Last name Raab. Doesn't make sense. >> >> PJ: >> >> Okay, if you enter "Johnson" in the last name text box and click the >> "Search Last Name" button, the demo will provide you with a record >> that has "Johnson" as the last name. >> >> Likewise, if you enter "John" in the first name text-box and click >> the "Search First Name" button, the demo will provide you with a >> record that has "John" as the first name. >> >> Both of those work -- so, where's the confusion? >> >> Apparently you want to enter "Johnson" in the last name text box and >> "John" in the first name text box and then click something to find >> that specific name right? Well, the demo is not set-up that way -- >> there is no "Click here and I'll find the specific person who has >> this first and last name". >> >> The demo is set up to search for first OR last name OR email address. >> It also provides a way to sort the records such that one can >> sequentially step any sort made on first-name/last-name; or >> last-name/first-name; or email address. >> >> It only does what it says it does. Did you review the instructions at >> the bottom? >> >> Cheers, >> >> tedd > > > Tedd, nice looking contact demo thingy.. but PJ has a point. ;-) It > would make the app perhaps more intuitive if one could just type text > in any of the 3 fields and then spit out results that match all of the > comparisons that are not blank by clicking one button. > > .. not to take away from what you have done, but perhaps a future > evolution of the demo. > > Donovan > Exactly. I expected to get all instances of Johnson or of John but I got only 1 and I saw that there were others, so that didn't seem right. And, if I may point out, the instructions are not available if js is not enabled O:-) so that leaves only intuition to decipher things especially if you only want to do a search. BTW - I seem to have solved the problem of filtering the inputs. Was rather simple: just use one form for each search. And to avoid using @ for the error of $_POST['select'] one just has to declare one just has to declare $_POST['submit'] = ""; at top of script. :-) (I'm learning, I'm learning) - now I have to check it all out. -- unheralded genius: "A clean desk is the sign of a dull mind. " - Phil Jourdan --- p...@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com/andypantry.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Self-Process php forms or not?
When you have it all in one file, the first thing you do is check to see if this request was submitted from the form. If not, you send the blank form. If it was, you validate all of the data. When a validation fails, you add error messages and resend the form with any fields that passed the validation already filled in. When validation succeeds, process and move on. No muss, no fuss. Bob McConnell -Original Message- From: Sándor Tamás (HostWare Kft.) [mailto:sandorta...@hostware.hu] Sent: Friday, April 24, 2009 8:53 AM To: 'PHP-General List' Subject: Re: [PHP] Self-Process php forms or not? I think the main advantage is that if something goes wrong processing the datas, you can show the form again without redirecting again. And if you have to change the behavior of the page, you have to change only one file instead of two. SanTa - Original Message - From: "MEM" To: "'PHP-General List'" Sent: Friday, April 24, 2009 2:34 PM Subject: [PHP] Self-Process php forms or not? I'm trying to understand the advantages behind opting by using a Self-Process PHP Form, instead of having a form and then point the action of the form to another .php page. Can anyone point me some resources about this. Why using one instead of another. What are the main advantages? Regards, Márcio -- 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] Self-Process php forms or not?
[snip] What about the moto: "let's separate business from presentation?"[/snip] This depends on how strictly you're following any given model like MVC. IMHO you should use the right tool for the job. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Self-Process php forms or not?
Well, if you keen on separating business from presentation (which is usually a good practice), you can always do this: So you can call in fact the processing page, the real presentation can be in another PHP file, as well as the processing functions. Of course, instead of PrintForm() you can actually implant the real HTML code. And by the way, if you keep the form and the processing parts in one file, and create the form like this: you can name your file as you want, it will work without rewriting the page. SanTa - Original Message - From: "MEM" To: "'Sándor Tamás (HostWare Kft.)'" ; "'PHP-General List'" Sent: Friday, April 24, 2009 3:03 PM Subject: RE: [PHP] Self-Process php forms or not? So, on your opinion, we can call that method, on some circumstances, a good practice? What about the moto: "let's separate business from presentation?" Thanks once again, Márcio -Original Message- From: Sándor Tamás (HostWare Kft.) [mailto:sandorta...@hostware.hu] Sent: sexta-feira, 24 de Abril de 2009 13:53 To: 'PHP-General List' Subject: Re: [PHP] Self-Process php forms or not? I think the main advantage is that if something goes wrong processing the datas, you can show the form again without redirecting again. And if you have to change the behavior of the page, you have to change only one file instead of two. SanTa -- 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] Self-Process php forms or not?
Having a script that is self executing - when it posts back to itself instead of a separate script - has absolutely nothing to do with the separation of business and presentation. It is possible for a single script to use separate components for the presentation, business and data access layers. -- Tony Marston http://www.tonymarston.net http://www.radicore.org ""MEM"" wrote in message news:002b01c9c4dd$08569bc0$1903d3...@com... > So, on your opinion, we can call that method, on some circumstances, a > good > practice? > > What about the moto: "let's separate business from presentation?" > > > Thanks once again, > Márcio > -Original Message- > From: Sándor Tamás (HostWare Kft.) [mailto:sandorta...@hostware.hu] > Sent: sexta-feira, 24 de Abril de 2009 13:53 > To: 'PHP-General List' > Subject: Re: [PHP] Self-Process php forms or not? > > I think the main advantage is that if something goes wrong processing > the > datas, you can show the form again without redirecting again. > > And if you have to change the behavior of the page, you have to change > only > one file instead of two. > > SanTa -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL, MD5 and SHA1
On Wed, Apr 22, 2009 at 10:25 AM, Jan G.B. wrote: > 2009/4/21 Per Jessen : >> Jan G.B. wrote: >> >>> A web application that uses an external db server would be quite ... >>> uhm... slow! Anyone did this, yet? ;) >> >> Certainly, and it's not slow. It depends entirely on your connection to >> the public internet. >> >> > > As we're speaking of the internet, it also depends on the route and so > it depends on servers which are not underlying your administration (in > most cases at least). > Having several servers with gigabit internet access also might be more > expensive than a cat6 patch cable and a gigabit nic. So this setup > would be just mad. > > Regards > There are definitely other ways to make the communication secure, whether you route it through an local subnet, configure a totally private network using secondary NICs, encrypt the connection, host both on the same machine and use a local loopback address, etc. If you've done one or more of these things to secure the pathway between the web server and the database, and if you know that no one is going to come behind you and reconfigure things, then you can probably rest fairly comfortably passing unhashed/unencrypted values to MySQL all you want. I only made the suggestion as a matter of defensive programming, since not everyone developing with PHP knows and/or has control over how PHP and MySQL communicate. For many sites, a developer writing an app has no idea whether the web server and database are on the same physical machine, let alone how the two services communicate. What's more, in some of these environments, what is true today could change tomorrow. (The issue of query logs is another good point, too.) All I'm saying is if you hash/encrypt the value in PHP rather than passing it off to MySQL in open text, you don't have to worry about whether the connection is (or becomes) sniffable. For that matter if you're going to bring up performance, I know many DBAs who would argue this as performance issue as well. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Self-Process php forms or not?
What you are describing is known as a "self executing" script where the script posts back to itself. In other words it has two passes - the first uses the GET method to build the screen for the user, which may or may not be empty, while the second uses the POST method to send the user's changes back to the server for validation and updating. By dealing with both the GET and POST in a single script it means that you don't have to redirect to a different script if you have to redisplay the data because of invalid use input. -- Tony Marston http://www.tonymarston.net http://www.radicore.org ""MEM"" wrote in message news:002301c9c4d9$03515920$09f40b...@com... I'm trying to understand the advantages behind opting by using a Self-Process PHP Form, instead of having a form and then point the action of the form to another .php page. Can anyone point me some resources about this. Why using one instead of another. What are the main advantages? Regards, Márcio -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] error with hosting
On Tue, Apr 21, 2009 at 1:20 PM, Jan G.B. wrote: > Do yourself a favour: > > * remopve that 1337 hax0r name - it makes you look like a dumbass This coming from someone whose e-mail address is ro0ot.w...@? Sounds a little ironic. ;-) Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] checkboxes
At 5:30 PM -0500 4/23/09, Lists wrote: Tedd, nice looking contact demo thingy.. but PJ has a point. ;-) It would make the app perhaps more intuitive if one could just type text in any of the 3 fields and then spit out results that match all of the comparisons that are not blank by clicking one button. .. not to take away from what you have done, but perhaps a future evolution of the demo. Donovan Point taken. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] error with hosting
2009/4/24 Andrew Ballard : > On Tue, Apr 21, 2009 at 1:20 PM, Jan G.B. wrote: >> Do yourself a favour: >> >> * remopve that 1337 hax0r name - it makes you look like a dumbass > > This coming from someone whose e-mail address is ro0ot.w...@? > Sounds a little ironic. ;-) Got me. ;) But try to find any free google-name like "Jan", etc.. I was looking for something with "root" in the address. and actually this is only the address, not my NAME. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Self-Process php forms or not?
Thanks to all for your replies. I'm more elucidated about the possibilities now. I have seen here a lot of keywords to start digging. :) Thanks once again, Márcio > -Original Message- > From: Tony Marston [mailto:t...@marston-home.demon.co.uk] > Sent: sexta-feira, 24 de Abril de 2009 14:20 > To: php-general@lists.php.net > Subject: Re: [PHP] Self-Process php forms or not? > > Having a script that is self executing - when it posts back to itself > instead of a separate script - has absolutely nothing to do with the > separation of business and presentation. It is possible for a single > script > to use separate components for the presentation, business and data > access > layers. > > -- > Tony Marston > http://www.tonymarston.net > http://www.radicore.org > > ""MEM"" wrote in message > news:002b01c9c4dd$08569bc0$1903d3...@com... > > So, on your opinion, we can call that method, on some circumstances, > a > > good > > practice? > > > > What about the moto: "let's separate business from presentation?" > > > > > > Thanks once again, > > Márcio > > > > -Original Message- > > From: Sándor Tamás (HostWare Kft.) [mailto:sandorta...@hostware.hu] > > Sent: sexta-feira, 24 de Abril de 2009 13:53 > > To: 'PHP-General List' > > Subject: Re: [PHP] Self-Process php forms or not? > > > > I think the main advantage is that if something goes wrong processing > > the > > datas, you can show the form again without redirecting again. > > > > And if you have to change the behavior of the page, you have to > change > > only > > one file instead of two. > > > > SanTa > > > > > -- > 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] error with hosting
On Fri, Apr 24, 2009 at 7:41 PM, Jan G.B. wrote: > 2009/4/24 Andrew Ballard : > > On Tue, Apr 21, 2009 at 1:20 PM, Jan G.B. > wrote: > >> Do yourself a favour: > >> > >> * remopve that 1337 hax0r name - it makes you look like a dumbass > > > > This coming from someone whose e-mail address is ro0ot.w...@? > > Sounds a little ironic. ;-) > > Got me. ;) > But try to find any free google-name like "Jan", etc.. I was looking > for something with "root" in the address. and actually this is only > the address, not my NAME. > HAHAHAHA you gotta look at this :D http://tr.im/jxK7
Re: [PHP] MAIL Error
At 11:13 AM +0200 4/24/09, Jan G.B. wrote: 2009/4/22 tedd : > Your opinion as to IF I should say something, or not, carries little weight. When you've donated enough time helping others on this list, then perhaps that will change. Sorry, but that's a bad attitude in my opinion. It's like "No matter how right or wrong you are, I will not listen to you unless you've kissed Johns feet 10 times, like I did." Nonsense. It not about who kisses who's feet and you know it. You're deliberately clouding the issue in a failed attempt to support your position that signatures should of any length. That's bullshit. My point is that many of us donate our time on a regular basis to this list to help others. And those regulars I consider friends. As such their comments and opinions matter. Whereas, your opinion doesn't matter much because you haven't contributed anything I can remember other than a "superior than thou" attitude about my comments that a poster should trim his signature, which is considered normal and proper for posting to a list. It's not hard to find support for my claim, such as: http://en.wikipedia.org/wiki/Netiquette So please, if your going to do nothing but be argumentative and present obtuse opinion to boost your ego, then find something else to do with your time. As far as I can see, you are wasting it here. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Creating A Chat?
"Nitsan Bin-Nun" a écrit dans le message de news:d47da0100904201431r2fcb8e19ufba47f33e53d0...@mail.gmail.com... Hi Guys, I have created few chats in the past, but I'm trying to create a new one which saves on HTTP requests and do not become an overkill to the server as more users get in. The chat is a one on one, I'm trying to achieve this: * A user sends a message * The message is not saved/save temporarily on the server * The message is showed to the other user Any ideas how i should implement this? I have no idea how to build it in the most efficiency way, any notes or recommendations or anything that I should pay attention to during development will be very appreciated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MAIL Error
On Fri, Apr 24, 2009 at 10:03 AM, tedd wrote: > At 11:13 AM +0200 4/24/09, Jan G.B. wrote: > >> 2009/4/22 tedd : >> > Your opinion as to IF I should say something, or not, carries little >> weight. >> >>> When you've donated enough time helping others on this list, then >>> perhaps >>> that will change. >>> >> >> Sorry, but that's a bad attitude in my opinion. It's like "No matter >> how right or wrong you are, I will not listen to you unless you've >> kissed Johns feet 10 times, like I did." >> > > Nonsense. It not about who kisses who's feet and you know it. You're > deliberately clouding the issue in a failed attempt to support your position > that signatures should of any length. That's bullshit. > > My point is that many of us donate our time on a regular basis to this list > to help others. And those regulars I consider friends. As such their > comments and opinions matter. > > Whereas, your opinion doesn't matter much because you haven't contributed > anything I can remember other than a "superior than thou" attitude about my > comments that a poster should trim his signature, which is considered normal > and proper for posting to a list. > > It's not hard to find support for my claim, such as: > > http://en.wikipedia.org/wiki/Netiquette > > So please, if your going to do nothing but be argumentative and present > obtuse opinion to boost your ego, then find something else to do with your > time. As far as I can see, you are wasting it here. > > Cheers, > > tedd > > -- > --- > http://sperling.com http://ancientstones.com http://earthstones.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Don't make me send you to your rooms, girls. Play nice! -- Bastien Cat, the other other white meat
[PHP] help with explode()
I have a form where users submit search terms and it explodes the terms into an array based upon spaces. But, how can I have explode() keep words in quotation marks together? For example, if someone enters on the form: John Jill "Judy Smith" and I run $termsarray = explode(" ", $_POST["terms"]); it explodes into: Array ( [0] => John [1] => Jill [2] => "Judy [3] => Smith" ) but I'd like it to explode into: Array ( [0] => John [1] => Jill [2] => "Judy Smith" ) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help with explode()
Jan G.B. wrote: You could try it with regular expression matching.. for example: Regards Thanks. That seems to create 2 duplicate arrays, though. Can it be narrowed down to just array [0]? preg_match_all('/([a-z]+|"[a-z ]+")/i', $_POST["terms"], $termsarray); echo $_POST["terms"].""; print_r($termsarray); displays: John Jill "Judy Smith" Array ( [0] => Array ( [0] => John [1] => Jill [2] => "Judy Smith" ) [1] => Array ( [0] => John [1] => Jill [2] => "Judy Smith" ) ) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MAIL Error
2009/4/24 Bastien Koert : > > > On Fri, Apr 24, 2009 at 10:03 AM, tedd wrote: >> Whereas, your opinion doesn't matter much because you haven't contributed >> anything I can remember Tedd, it's not my problem that your sight is limited. I don't believe the Netiquette states that "whatever one says, it doesn't matter unless the reader noticed " >> >> It's not hard to find support for my claim, such as: >> >> http://en.wikipedia.org/wiki/Netiquette >> >> So please, if your going to do nothing but be argumentative and present >> obtuse opinion to boost your ego, then find something else to do with your >> time. As far as I can see, you are wasting it here. >> >> Cheers, >> >> tedd >> >> -- >> --- >> http://sperling.com http://ancientstones.com http://earthstones.com >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> > > Don't make me send you to your rooms, girls. Play nice! > Seems to be to late. That wasn't nice at all. > -- > > Bastien > > Cat, the other other white meat > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help with explode()
2009/4/24 Adam Williams : > I have a form where users submit search terms and it explodes the terms into > an array based upon spaces. But, how can I have explode() keep words in > quotation marks together? For example, if someone enters on the form: > > John Jill "Judy Smith" > > and I run $termsarray = explode(" ", $_POST["terms"]); > > it explodes into: > > Array ( [0] => John [1] => Jill [2] => "Judy [3] => Smith" ) > > but I'd like it to explode into: > > Array ( [0] => John [1] => Jill [2] => "Judy Smith" ) > You could try it with regular expression matching.. for example: Regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help with explode()
2009/4/24 Adam Williams : > > > Jan G.B. wrote: >> >> You could try it with regular expression matching.. >> for example: >> > preg_match_all('/([a-z]+|"[a-z ]+")/i', $searchstring, $resultarray); >> ?> >> >> >> Regards >> > > Thanks. That seems to create 2 duplicate arrays, though. Can it be > narrowed down to just array [0]? > > preg_match_all('/([a-z]+|"[a-z ]+")/i', $_POST["terms"], $termsarray); > echo $_POST["terms"].""; > print_r($termsarray); > > displays: > > John Jill "Judy Smith" > Array ( [0] => Array ( [0] => John [1] => Jill [2] => "Judy Smith" ) [1] => > Array ( [0] => John [1] => Jill [2] => "Judy Smith" ) ) > Yes, preg_match_all returns all matches and the subpattern matches (the "stuff" inside the brakes) You can ommit stop it by using (?:) instead of ().. So: preg_match_all('/(?:[a-z]+|"[a-z ]+")/i', $_POST["terms"], $termsarray) You might want to check out the regular expression manuals on http://www.php.net/manual/en/book.pcre.php regards > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RES: [PHP] help with explode()
$var = "John \"Jill\" \"Judy Smith\""; echo $var; $var2=explode("\"",$var); echo ''; print_r($var2); echo ''; $tVar=count($var2); for($i=0;$i<$tVar;$i++){if(strlen($var2[$i])<2){unset($var2[$i]);}else{$var2 [$i]=trim($var2[$i]);}} $var2=array_values($var2); echo ''; print_r($var2); echo ''; Is that u want? Zechim SP/Brazil -Mensagem original- De: Adam Williams [mailto:awill...@mdah.state.ms.us] Enviada em: sexta-feira, 24 de abril de 2009 12:41 Para: PHP General list Assunto: [PHP] help with explode() I have a form where users submit search terms and it explodes the terms into an array based upon spaces. But, how can I have explode() keep words in quotation marks together? For example, if someone enters on the form: John Jill "Judy Smith" and I run $termsarray = explode(" ", $_POST["terms"]); it explodes into: Array ( [0] => John [1] => Jill [2] => "Judy [3] => Smith" ) but I'd like it to explode into: Array ( [0] => John [1] => Jill [2] => "Judy Smith" ) -- 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] help with explode()
Jan G.B. wrote: Yes, preg_match_all returns all matches and the subpattern matches (the "stuff" inside the brakes) You can ommit stop it by using (?:) instead of ().. So: preg_match_all('/(?:[a-z]+|"[a-z ]+")/i', $_POST["terms"], $termsarray) You might want to check out the regular expression manuals on http://www.php.net/manual/en/book.pcre.php regards Thanks, you've been a big help, that works great! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Expression Engine
Hey all, Anyone have any experience with Expression Engine? I have a new client that wants me to use it to build a site and I must say I am rather underwhelmed. But I happen to be one of those people that believe in developing your own lightweight framework you know yourself inside and out and building upon that for new sites. I find the learning curve, combined with inherent limitations of systems like this to take all the fun out of coding and project development... and make me want to become an insurance salesman. Thoughts on Expression Engine for those of you with exposure to it? Thanks, Skip -- Skip Evans Big Sky Penguin, LLC 503 S Baldwin St, #1 Madison WI 53703 608.250.2720 http://bigskypenguin.com Those of you who believe in telekinesis, raise my hand. -- Kurt Vonnegut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Expression Engine
On Apr 24, 2009, at 18:06, Skip Evans wrote: Hey all, Anyone have any experience with Expression Engine? I have a new client that wants me to use it to build a site and I must say I am rather underwhelmed. But I happen to be one of those people that believe in developing your own lightweight framework you know yourself inside and out and building upon that for new sites. I find the learning curve, combined with inherent limitations of systems like this to take all the fun out of coding and project development... and make me want to become an insurance salesman. Thoughts on Expression Engine for those of you with exposure to it? Thanks, Skip -- Skip Evans Big Sky Penguin, LLC 503 S Baldwin St, #1 Madison WI 53703 608.250.2720 http://bigskypenguin.com Those of you who believe in telekinesis, raise my hand. -- Kurt Vonnegut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I remember looking at it some time and the licensing seems restrictive to what I wanted to do. I have at this point settled on using codeigniter and ezcompoments has some cool stuff as well -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] I need ideas for things to code
I've been coding PHP for about a year, and I'm running out of things to code that force me to learn new things. If you have any suggestions, I'd greatly appreciate it.
Re: [PHP] I need ideas for things to code
Andrew Hucks wrote: I've been coding PHP for about a year, and I'm running out of things to code that force me to learn new things. If you have any suggestions, I'd greatly appreciate it. a: get paid to do it; pick up work on freelance sites and they'll give you the ideas + you'll get paid to do it b: see a -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I need ideas for things to code
how about: a replacement for mailman in php a trac/redmine written in php a better bugzilla replacement in php On Fri, Apr 24, 2009 at 4:25 PM, Nathan Rixham wrote: > Andrew Hucks wrote: >> >> I've been coding PHP for about a year, and I'm running out of things to >> code >> that force me to learn new things. If you have any suggestions, I'd >> greatly >> appreciate it. >> > > a: get paid to do it; pick up work on freelance sites and they'll give you > the ideas + you'll get paid to do it > > b: see a > > -- > 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] inexplicable behaviour
Frankly, I don't know what to look for or why something so weird would happen: I have pagination set up and the number for pages "next" has a link but the "next" does not. I have experimented with all sorts of configurations of the code but the only thing that works (and this is totally "off the wall") is to do this $Count = mysql_num_rows($results); $Count1=$Count++; // without this, the "next" does not do the link--- but there is no other $Count1 in the code either in the original page or the include page. And this phenomenon was apparent in a similar page. I'd be curious to understand how this could happen. I could post the whole code, but that would be some 300 lines... -- unheralded genius: "A clean desk is the sign of a dull mind. " - Phil Jourdan --- p...@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com/andypantry.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I need ideas for things to code
On Apr 24, 2009, at 19:00, Andrew Hucks wrote: I've been coding PHP for about a year, and I'm running out of things to code that force me to learn new things. If you have any suggestions, I'd greatly appreciate it. What have you coded? How about a chat app? How about a simple db based version control system? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RES: [PHP] inexplicable behaviour
Is the $Count++.. -Mensagem original- De: PJ [mailto:af.gour...@videotron.ca] Enviada em: sexta-feira, 24 de abril de 2009 21:14 Para: php-general@lists.php.net Assunto: [PHP] inexplicable behaviour Frankly, I don't know what to look for or why something so weird would happen: I have pagination set up and the number for pages "next" has a link but the "next" does not. I have experimented with all sorts of configurations of the code but the only thing that works (and this is totally "off the wall") is to do this $Count = mysql_num_rows($results); $Count1=$Count++; // without this, the "next" does not do the link--- but there is no other $Count1 in the code either in the original page or the include page. And this phenomenon was apparent in a similar page. I'd be curious to understand how this could happen. I could post the whole code, but that would be some 300 lines... -- unheralded genius: "A clean desk is the sign of a dull mind. " - Phil Jourdan --- p...@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com/andypantry.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
[PHP] SMTP mail server
How do I specify an actual SMTP server? (Like mail.host.com) This is what I have so far: mail($email, $subject, $message, $headers); I was to http://ca2.php.net/manual/en/function.mail.php and saw this syntax: mail ( string $to , string $subject , string $message [, string $additional_headers [, string $additional_parameters ]] ) Ronhttp://
Re: [PHP] I need ideas for things to code
Andrew Hucks wrote: I've been coding PHP for about a year, and I'm running out of things to code that force me to learn new things. If you have any suggestions, I'd greatly appreciate it. I'm currently writing an in-house PHP helpdesk ticket system. I looked at all the open source ones i could find in a google search and they didn't do what I need (some had few features, others didn't support authentication against external sources (ldap, imap, etc)). the commercial ones seemed like they'd do what I want, but the budget is tight with my employer currently. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SMTP mail server
Ron Piggott wrote: How do I specify an actual SMTP server? (Like mail.host.com) This is what I have so far: mail($email, $subject, $message, $headers); I was to http://ca2.php.net/manual/en/function.mail.php and saw this syntax: mail ( string $to , string $subject , string $message [, string $additional_headers [, string $additional_parameters ]] ) Ronhttp:// http://www.php.net/manual/en/mail.configuration.php looks like you can edit php.ini and change SMTP=localhost to something else and restart apache (if needed) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SMTP mail server
if u cant change the configuration settings of php.ini use http://pear.php.net/package/Mail alternatively u can also hav ini_set on top of every page. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SMTP mail server
I am on a shared web site hosting company. They are asking me to edit my PHP script to specify the SMTP using $aditional_parameters on the URL below. If this can't be achieved then I need to confirm this. Ron On Fri, 2009-04-24 at 20:04 -0500, Adam Williams wrote: > > Ron Piggott wrote: > > How do I specify an actual SMTP server? (Like mail.host.com) > > > > This is what I have so far: > > > > mail($email, $subject, $message, $headers); > > > > I was to http://ca2.php.net/manual/en/function.mail.php and saw this > > syntax: > > > > mail ( string $to , string $subject , string $message [, string > > $additional_headers [, string $additional_parameters ]] ) > > > > Ronhttp:// > > > > > http://www.php.net/manual/en/mail.configuration.php > > looks like you can edit php.ini and change SMTP=localhost to something > else and restart apache (if needed) >
Re: [PHP] SMTP mail server
I am needing to put this into one specific PHP script. What would the ini_set look like? Ron On Sat, 2009-04-25 at 06:43 +0530, kranthi wrote: > if u cant change the configuration settings of php.ini > use http://pear.php.net/package/Mail > alternatively u can also hav ini_set on top of every page.
Re: [PHP] SMTP mail server
ini_set("SMTP", "mail.host.com"); ini_set("smtp_port", 25); http://ca2.php.net/manual/en/mail.configuration.php http://ca2.php.net/manual/en/function.ini-set.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Self-Process php forms or not?
Hello, on 04/24/2009 09:34 AM MEM said the following: > I’m trying to understand the advantages behind opting by using a > Self-Process PHP Form, instead of having a form and then point the action of > the form to another .php page. > > Can anyone point me some resources about this. Why using one instead of > another. What are the main advantages? You may want to watch this tutorial video that explains why presenting and processing a form with a single script is a better solution. http://www.phpclasses.org/browse/video/1/package/1/section/usage.html Basically if you use the same script, if the form has invalid fields, you can present the form with the previously submitted values. -- Regards, Manuel Lemos Find and post PHP jobs http://www.phpclasses.org/jobs/ PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SMTP mail server
Hello, on 04/24/2009 10:17 PM Ron Piggott said the following: > I am on a shared web site hosting company. They are asking me to edit > my PHP script to specify the SMTP using $aditional_parameters on the URL > below. If this can't be achieved then I need to confirm this. No, AFAIK you cannot configure the SMTP server that way, unless your Web hosting company hacked the mail function. Otherwise, I think they have no idea how to do it and are wild guessing. The fact is that you do not need to use an SMTP server, especially if your web host is run on Linux or any Unix like system. In Linux the mail function just injects the message in the local mail server queue and from then on the mail server sends the message to the remote recipient domain SMTP server so it reaches the destination mailbox. You may want to watch this slide presentation that has a slide that explains exactly how mail messages are routed. Take a look at slide 13. http://www.phpclasses.org/browse/video/3/package/9.html -- Regards, Manuel Lemos Find and post PHP jobs http://www.phpclasses.org/jobs/ PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php