RE: [PHP] cool your jets [WAS: Re: [PHP] working on a template system...]
The only one with an ego around here is you. Frankly, no one cares that your pressed for time. Your lucky someone even responds to your questions. Get the hell off the list and stop bitching. -Original Message- From: Paul Novitski [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 28, 2006 1:15 PM To: PHP-General Subject: [PHP] cool your jets [WAS: Re: [PHP] working on a template system...] Hey kids, I thought I was joining a PHP list, not a snarky ego-fest. I assume most of us are trying to get work done around here and are interested in programming QA. Please take your squabbles off-list or re-title them. They're off-topic and a waste of everyone's else's time. Yeah I've got a delete key but I have to open read the extraneous crap to discover that I need to delete the garbage messages. I'm pressed for time. If you're not, PLEASE get some programming work to keep you off the street. This list badly needs a bouncer. If you can't treat your colleagues with respect, what is it that you need? More love? sex? drugs? therapy? Whatever it is, please work out your emotional issues off-list so you don't feel compelled to take out your frustrations on your peers who are, just like you, trying to do their best with the intelligence and education at hand. Any asshole can declare war. The future is made of cooperation, respect, and mutual education. Can anyone recommend another PHP list where there's a much higher signal-to-noise ratio? Grumpily, Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] An annoying session problem
td colspan=5?php $userid ? ?php $_SESSION['username'] ?/td that should be ?= $_SESSION['username'] ? or ?php echo $_SESSION['username']; ? its all in how you call the variables.. ?php $somevar ? isint telling the variable to do anything. -phpninja -Original Message- From: Alex Major [*mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]] Sent: Monday, June 19, 2006 8:26 AM To: php-general@lists.php.net Subject: [PHP] An annoying session problem Hi there. I'm working my way through a new script, but I've stumbled into a problem. Some data that I've set into a session, won't be processed by part of my php code, but then later on in the page I can get the session value to output. Also, just so that its clear, the mysql code is correct (I can put it into phpmyadmin and get results from it. Heres the code (this code is 'included' in another page, where the session originates and session_start(); is set.) ?php // Lets see how much the person has at the moment. $current_resource_query = SELECT food, wood, stone, gold, population FROM game_resources WHERE user_id = '.$_SESSION['user_id'].'; $current_resource_result = mysql_query($current_resource_query); $current_resource = mysql_fetch_assoc($current_resource_result); ? table width=100% cellspacing=1 cellpadding=1 tr td colspan=5?php $userid ? ?php $_SESSION['username'] ?/td /tr tr td width=20%Food: ?php $current_resource['food'] ?/td td width=20%Wood: ?php $current_resource['wood'] ?/td td width=20%Stone: ?php $current_resource['stone'] ?/td td width=20%Gold: ?php $current_resource['gold'] ?/td td width=20%Session id is: ?php echo ''.$_SESSION['user_id'].'' ?/td /tr /table The error may not necessarily be to do with the session, but non of the $current_resources are showing. Thanks for any help guys/gals. -- PHP General Mailing List (*http://www.php.net/* http://www.php.net/) To unsubscribe, visit: *http://www.php.net/unsub.php*http://www.php.net/unsub.php
RE: [PHP] Letters in Loops
Hello, for($i=A;$i=Z;$i++) { if ($i == ZZ) { break; } echo $i; } regards, phpninja -Original Message- From: Ben Miller [*mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]] Sent: Thursday, March 23, 2006 7:08 AM To: php-general@lists.php.net Subject: [PHP] Letters in Loops In trying to make an alpha list, using the following: for($i=A;$i=Z;$i++) { echo $i; } Produces: A B C... X Y Z AA AB AC... AX AY AZ... all the way to YZ. What am I doing wrong that it's not stopping at just plain old Z, without moving on to AA and continuing? -- PHP General Mailing List (*http://www.php.net/* http://www.php.net/) To unsubscribe, visit: *http://www.php.net/unsub.php*http://www.php.net/unsub.php
Re: [PHP] Ugh. Need some advice...
There is not going to be 1 easy solution that you can just magically tie in to your existing design. No matter what solution you chose, you are going to have to hack around to get it all working (any pre-written script). If it DOES everything you need, then you are not going to get any further with any other product. You are eventually going to have to succumb to integrating it with your existing design because the only other choice you have is writing your own cart/back end. [EMAIL PROTECTED] John Nichel [EMAIL PROTECTED] wrote: *http://www.x-cart.com/* http://www.x-cart.com/ Yeah, I downloaded this to play aorund with it. My problem is I am not that great at working with template engines/system. I don't know where the f#!@ to change anything and the documentation isn't all that self explanatory. From the feature list, I'd like to use this software. It DOES do that I need. It's just integrating it with our design... :( Thanks John. Aaron -- PHP General Mailing List (*http://www.php.net/* http://www.php.net/) To unsubscribe, visit: *http://www.php.net/unsub.php*http://www.php.net/unsub.php
Re: [PHP] Regex nightmares
W Luke wrote: Hi, I really struggle with regex, and would appreciate some guidance. Basically, I have a whole load of files (HTML) which are updated every few minutes. I need to go through each line, looking for the word CONFIRMED: (which is always in capitals, and always superseded by a colon). The line looks like this: 22.5 J.Smith at Thropton, CONFIRMED: more text here, including commas and info on the appointment etc There are other similar appointments that haven't yet been confirmed, so..I just need to pick out the confirmed ones. Once the regex finds CONFIRMED: I also need it to grab the text up to and including the date (22.5). I don't really need any text *after* CONFIRMED: yet, but possible in the future. There seem to be a lot of tutorials on, eg, getting hrefs from anchor tags, but I can't get my head around this particular one. Any ideas or pointers would be great Something like this might also work as well: if ( strstr($line, CONFIRMED) ) { // do the magic to parse text here. } -phpninja
Re: [PHP] Re: Authentication fails - problem line found
I think all php functions are case sensitive and must be all lowercase. try changing IsSet to isset and give it a run. I im not 100% sure because i always type every function in php lowercase and keep it the same throughout the application so i dont ever have to worry about that. Just a thought. -phpninja -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Friday, March 04, 2005 11:03 AM To: John Swartzentruber Cc: php-general@lists.php.net Subject: Re: [PHP] Re: Authentication fails - problem line found John Swartzentruber wrote: I stripped down my original script until it started receiving POST data, then I kept modifying it until I figured out where the problem was. I found it, but I'm still as clueless as every. To summarize: I have a form that posts to the same script that contains the form. In its original state, when the script is called after I submit the form data, the $_POST[] data is completely empty and the _SERVER variable that indicates the type of data is set to GET. In the script is the following code: if (IsSet($_POST[action])) { //$action = $_POST[action]; } else { $action = $_GET[action]; } Normally the second line is not commented. When I comment out that line, then the $_POST array has all of the data I would expect it to. When it is not commented, then it does not work. Just to make sure that I am really confused, this bit of code is *after* the call to var_dump($_POST), but *before* the code that creates the form. Does anyone have any ideas about why setting this variable has such a large and seemingly unrelated affect? WILD GUESS: Somewhere in your form and/or the logic, you are sending GET data for $action as well as POST data for $action, and you are confusing the two. Show us your stripped-down but still-broken code. -- 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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php editor
Know any goog ones? funny you should mention goog.. if you google'd php editor youd have your answer by now.. cheers phpninja -Original Message- From: William Stokes [mailto:[EMAIL PROTECTED] Sent: Thursday, January 13, 2005 8:02 AM To: php-general@lists.php.net Subject: [PHP] php editor Hello, I'm quite new with writing php code. I was considering of using some kind of php editor program to help with the syntax. Know any goog ones? Thanks -Will -- 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] hackers?
Not many people will do this for free, and there area actually whole IT security firms that base their whole buisness on trying to break peoples systems. Check this google search under the sponsered links on the right and you'll see what im talking about: http://www.google.com/search?hl=enlr=q=network+security+auditing -phpninja -Original Message- From: Sebastian [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 22, 2004 12:22 PM To: php-general@lists.php.net Subject: [PHP] hackers? not sure if this is a stupid question, but im looking for a person or a place that will check or try to break a site. not in a bad way of course.. just trying to see things from a security point. you can be the best coder out there and still have a flaw that you might not see, but another might. so.. just like to know if there are any volunteers out there that have experience in breaking a site looking for flaws. -- 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 form results
http://www.php.net/mail -phpninja -Original Message- From: Ken Bolton [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 21, 2004 10:11 AM To: [EMAIL PROTECTED] Subject: [PHP] email form results Is there a simple way to send the results of a form to an email address? I have created a form with multiple categories of radio boxes and I have created a response PHP file that will give the user a confirmation. I'm just not sure how to send the results through email. I've checked the documentation with no luck. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Setting or Getting Relative Path for PHP Includes
I usually use a global variables file included in every page and map my directories that way.. example, have the file you include on each page have these line of code in it: ?php $GLOBALS['images'] = /images/; $GLOBALS['inc''] = /incl/; ? then those directories are mapped, all you have to do is use it this way, I chose images and and include directory for an example to use it for an image img src=?= $GLOBALS['images'] ?whatever.jpg To do includes for a stylesheet or somethin: link href=?= $GLOBALS['inc'] ?style.css type=text/css rel=stylesheet: -phpninja -Original Message- From: Anthony Baker [mailto:[EMAIL PROTECTED] Sent: Monday, December 20, 2004 12:41 PM To: [EMAIL PROTECTED] Subject: [PHP] Setting or Getting Relative Path for PHP Includes Hey Folks, Hoping someone can aid me with a newbie-ish question. I often use PHP includes in my files to pull in assets, but I hard code the relative path to the root html directory for the sites that I'm working on in each file. Example below: ?php $path = '/home/virtual/sitename.com/var/www/html/'; //relative path to the root directory $inc_path = $path . 'code/inc/'; //path and folder the code includes folder is located $copy_path = $path . 'copy/'; //path and folder the copy is located ? I'd like to be able to set the relative path as a global variable from an external file so that I can modify one line of code to change the relative path across the site. This will allow me for easier coding in staging and development environments. What's the best way to do so? Can anyone provide a code example? Either that, or is there a way to call this variable from the server itself so that it's automatically -- and correctly -- set? Thanks, Anthony -- 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] Parsing php in html with IIS
apache will run on windows so you shouldnt fear:) Anyways go into the properties tab of the IIS web server, you need to register .php as a valid file extension, there is a list of all file extensions under that tab (its one of the tabs in there i cant remember). Add in .php . If you've already mapped the php .dll or whatever to parse php files in that same IIS properties area you should be good to go after adding in that extension map.. phpninja -Original Message- From: Eric Lindsey [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 15, 2004 2:02 PM To: [EMAIL PROTECTED] Subject: [PHP] Parsing php in html with IIS Gents, How do I configure my IIS server to parse a specific .html file for php code? I know how to do this on apache, but windows scares me :-) THANKS! Eric Lindsey Colorado Information Technologies Inc. http://www.coinfotech.com http://www.coinfotech.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] 'Code Snippets' you couldn't live without
I would have to say I could not live without pear. http://pear.php.net It is quick and clean, ive reused it in about 3-4 projects easily. Its built into php when you download php. just run the go-pear batch file in the root directory, and it will set it up easily. From there you can get real organized with your code. Try to play around with it if you havent looked at it yet, its great. Not exactly 'code snippits' in the sence of reusable functions, but great for reuse project to project.. phpninja -Original Message- From: Murray @ PlanetThoughtful [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 03, 2004 10:17 AM To: [EMAIL PROTECTED] Subject: [PHP] 'Code Snippets' you couldn't live without Hi All, I'm curious to know what other members of the list think of as the code snippets they couldn't live without when working on a PHP project. IE, the kind of re-usable bits and pieces that make your life a lot easier. For myself, I have an include file in which I define 'shorthand' functions for functions etc I use on a regular basis. Eg: function asl($val){ return addslashes($val); } function mfr($rset){ mysql_free_result($rset); } ...and so on. Just thought it would be interesting to see what others do to make programming more bearable. Much warmth, Murray http://www.planetthoughtful.org Building a thoughtful planet, One quirky comment at a time. -- 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