Re: [PHP] Off the wall - sub-domain question
The only way that I know of to take care of that is to put a file in your main directory called robots.txt. In that file you will put: User-agent: * Disallow: /FolderName On Thu, Aug 22, 2013 at 6:19 AM, Jim Giner jim.gi...@albanyhandball.comwrote: On 8/22/2013 8:05 AM, Curtis Maurand wrote: Is the subdomain also in a subfolder of the main domain? Jim Giner wrote: I have a main domain (of course) and a sub domain. I'm really trying to steer my personal stuff away from the main one and have focused all of my php development to the sub-domain. Lately I noticed that google catalogs my sub-domain site stuff under the main domain name and the links that come up lead to that domain name with the path that takes the user to the sub-domain's home folder and beyond. Is there something that php (apache??) can do to control either google's robots or the user's view (url) so that it appears as a page of my sub-domain? I'm really new at this stuff and know nothing. I'm lucky that google is even finding my site! IN advance - I apologize for this off-topic question, but this place is a source of much knowledge, so I just threw in a quick interlude here to pick someone's brain. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Yes - the sub is an add-on domain to my primary domain. Hence the overlap and problem. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Willie Matthews matthews.wil...@gmail.com
[PHP] Best PHP Template System
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have been looking at Smarty Template Engine. The only reason I don't like it is because it is really slow when there are a bunch of results for pagination. Question is, is there something out there that is a lot faster with pagination built into it? Also with the features of Smarty Template Engine? - -- Willie Matthews matthews.wil...@gmail.com -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJPmHE9AAoJEPyaSMdprRSF+swH/jkXqfzG+uHE/g7HleLnRIa+ Ld0QYCIXPA1xdv5yPl3HndxPkMeCbvmqPCcdCchQR+2QGV2vOi/P+LycJbh01jb0 ht1BGb+MsOikyT+sNn2VYT1kjKENwZ3VJ4tsjTaGZl9Si98NZGAhCdzAhvkIvB8t xavbA8eX7y6fKpaGMmV5fOfPDSxavLMy0T7ox2mmLo7UBFcjRyd+Icghdd7rSK34 WH8Wd/nhpcX4E/zCc0D1zEnfzWP/Z7yS0GJi/sLSGpZcs7AyAvQV60XKCSuABBRf z23n0wrdSmgjbahGFalmog+9u5JxceCxwQ9ZT4tzOgoihLwhwZCUYFxyaWv5jyI= =jMqu -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best PHP Template System
Point taken. I will try to learn without the Template Engine! Thanks a lot Yared! On Wed, Apr 25, 2012 at 3:07 PM, Yared Hufkens y4...@yahoo.de wrote: Why use an external engine which slows your scripts down to do something which can easily be done by PHP itself? PHP is imho the best template engine for PHP. With PHP 5.4, it became even easier because ?=$do-somestuff()? can be used without short_open_tag enabled. However, you always schould divide UI and backend. --- Ursprüngl. Mitteilung --- Von: Willie Matthews Gesend.: 25.04.2012, 23:48 An: PHP Mailinglist Betreff: [PHP] Best PHP Template System -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have been looking at Smarty Template Engine. The only reason I don't like it is because it is really slow when there are a bunch of results for pagination. Question is, is there something out there that is a lot faster with pagination built into it? Also with the features of Smarty Template Engine? - -- Willie Matthews matthews.wil...@gmail.com -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJPmHE9AAoJEPyaSMdprRSF+swH/jkXqfzG+uHE/g7HleLnRIa+ Ld0QYCIXPA1xdv5yPl3HndxPkMeCbvmqPCcdCchQR+2QGV2vOi/P+LycJbh01jb0 ht1BGb+MsOikyT+sNn2VYT1kjKENwZ3VJ4tsjTaGZl9Si98NZGAhCdzAhvkIvB8t xavbA8eX7y6fKpaGMmV5fOfPDSxavLMy0T7ox2mmLo7UBFcjRyd+Icghdd7rSK34 WH8Wd/nhpcX4E/zCc0D1zEnfzWP/Z7yS0GJi/sLSGpZcs7AyAvQV60XKCSuABBRf z23n0wrdSmgjbahGFalmog+9u5JxceCxwQ9ZT4tzOgoihLwhwZCUYFxyaWv5jyI= =jMqu -END PGP SIGNATURE- -- 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 -- Willie Matthews matthews.wil...@gmail.com
RE: [PHP] Inserting records in a particular way in MySQL
Phillip, You will have to change your code, so the primary key is not an auto incremented value. If you don't, the auto increment will over-ride the 'get next' function. Here is what I use in my code. You just need to change it for your table. //- GetNextKey -// function getnextkey(){ $db = new db(); $query = select max(MemberKey) lastkey from Members; $result=exequery($query); if(@mysql_num_rows($result) 0){ $numrows=mysql_num_rows($result); $flds=mysql_num_fields($result); //Should only be one row, but just in case for($r=0; $r $numrows; $r++){ $row=mysql_fetch_array($result); $lastkey = StripSlashes($row[lastkey]); } } else { return 1; } if (is_numeric($lastkey)) { return $lastkey+1; } else { return 1; } $db-closedb(); } -Original Message- From: Phillip S. Baker [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 16, 2003 12:37 PM To: PHP Email List Subject: [PHP] Inserting records in a particular way in MySQL Greetings all, I have some PHP code that is inserting records into a DB. Most of this is auto increment. However I know there is allot of breaks in the sequencing. I am wondering if there is some way to write the SQL code to search through the existing records in the DB and to find where the next available ID is instead of just inserting the next sequence. So for example if the ID's are. 20453 20454 20458 20459 It would let me know that 20455 is available for use and use the ID number instead of using 20460 Thanks all. Phillip +++ IMPORTANT: This email message (including attachments, if any) is intended for the use of the individual addressee(s) named above and may contain information that is confidential, privileged or unsuitable for overly sensitive persons with low self-esteem, no sense of humor or irrational religious beliefs. If you are not the intended recipient, any dissemination, distribution or copying of this email is not authorized (either explicitly or implicitly) and constitutes an irritating social faux pas. Unless the word absquatulation has been used in its correct context somewhere other than in this warning, it does not have any legal or no grammatical use and may be ignored. No animals were harmed in the transmission of this email, although the barking dachshund next door is living on borrowed time, let me tell you. Those of you with an overwhelming fear of the unknown will be gratified to learn that there is no hidden message revealed by reading this warning backwards, so just ignore that Alert Notice from Microsoft. However, by pouring a complete circle of salt around yourself and your computer you can ensure that no harm befalls you, your family or your pets. If you have received this email in error, please add some nutmeg and egg whites, whisk and place in a warm oven for 40 minutes. +++ -- 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] Inserting records in a particular way in MySQL
Miles, I never use auto increment. Not because of gaps, but in case I need to reload the table. They do have meaning if they are foreign keys to another table. - Larry -Original Message- From: Miles Thompson [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 16, 2003 1:14 PM To: Phillip S. Baker; PHP Email List Subject: Re: [PHP] Inserting records in a particular way in MySQL Phillip, It doesn't matter, obviously you're not using the autoincrement ID for a foreign key. All this does is identify a record. If you did a SELECT and found a missing sequence number, what's to say that value would not be inserted by another user before your INSERT? If you have not set up the table with a MyISAM, MySQL will eventually use the missing numbers. These are only identifying tags, with no intrinsic meaning. Miles At 09:37 AM 2/16/2003 -0800, Phillip S. Baker wrote: Greetings all, I have some PHP code that is inserting records into a DB. Most of this is auto increment. However I know there is allot of breaks in the sequencing. I am wondering if there is some way to write the SQL code to search through the existing records in the DB and to find where the next available ID is instead of just inserting the next sequence. So for example if the ID's are. 20453 20454 20458 20459 It would let me know that 20455 is available for use and use the ID number instead of using 20460 Thanks all. Phillip snip overly long sig -- 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] Re: SQL Query
Zydox, Please define 'sub-interest'. I've looked at what Uttam gave you, and it looks correct, assuming you want want it limited to the same user. If you result should be 'all with Interest = X and Valid = Y, just remove the userid from the second query. SELECT InterestsList.ID, InterestsList.SubID, InterestsList.Interest, InterestsList.Valid FROM InterestsIndex INNER JOIN InterestList ON InterestIndex.InterestID=InterestList.ID WHERE InterestList.SubID='3' AND InterestList.Valid='1' - Larry -Original Message- From: Zydox [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 15, 2003 7:58 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: SQL Query Those querys work... but they don't get all the Sub Interests... Uttam [EMAIL PROTECTED] wrote in message 97FB62E1E350D511B71F00A0C99D0CC30352D563@MSEXCHANGE">news:97FB62E1E350D511B71F00A0C99D0CC30352D563@MSEXCHANGE... if i understand you correctly then this should give valid interests of a user: SELECT DISTINCT InterestsList.SubID FROM InterestsIndex INNER JOIN InterestList ON InterestIndex.InterestID=InterestList.ID WHERE InterestIndex.UserID='1' AND InterestList.Valid='1' and if the chosen interest is '3' then valid subinterests are: SELECT InterestsList.ID, InterestsList.SubID, InterestsList.Interest, InterestsList.Valid FROM InterestsIndex INNER JOIN InterestList ON InterestIndex.InterestID=InterestList.ID WHERE InterestIndex.UserID='1' AND InterestList.SubID='3' AND InterestList.Valid='1' regds, -Original Message- From: Zydox [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 15, 2003 09:48 To: [EMAIL PROTECTED] Subject: SQL Query I have a problem writing a query that can select a Interest for a specific user... There are tvo tables, IList and IIndex... IList contains this : ID SubID Interest Valid Edit Delete 1 0 Datorer 0 Edit Delete 2 1 Spel 0 Edit Delete 3 2 Strategi 0 Edit Delete 4 3 Star Craft 1 Edit Delete 5 3 Star Wars: Gallactic Battelinggrounds 1 Edit Delete 6 2 Shoot-Em-Up 0 Edit Delete 7 6 Half-Life 0 Edit Delete 8 7 Team Fortress 1 Edit Delete 9 7 Counter-Strike 1 And IIndex contains a UserID And InterestID... this query : SELECT DISTINCTROW InterestsList.ID, InterestsList.SubID, InterestsList.Interest, InterestsList.Valid FROM InterestsList AS II RIGHT JOIN InterestsList ON InterestsList.ID=II.SubID LEFT JOIN InterestsIndex ON InterestsList.ID=InterestsIndex.InterestID AND InterestsIndex.UserID='1' Selects all rows from IList... even if there Is'nt any instans in IIndex.. . this thougt is that a User can choose a Valid Interest and then the query should select all SubInterests... anyone know how to do that ? // Regards Zydox -- 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] Re: SQL Query
Zydox, Your request does not make sense. There must be other fields you want to link, because if we go back you your original data, these records are unrelated. The 'SubID' of Star Craft and Star Wars match. The 'Valid' of Star Craft, Star Wars, Team Fortress, and Counter-Strike match. Datorer and Strategi have nothing in common with the other items in your list, or each other. Unless you have another table or additional field that have not been provided in this thread, you have no way to relate those elements to each other. Below is your original data provided: ID SubID Interest Valid 1 0 Datorer 0 2 1 Spel 0 3 2 Strategi 0 4 3 Star Craft 1 5 3 Star Wars: Gallactic Battelinggrounds 1 6 2 Shoot-Em-Up 0 7 6 Half-Life 0 8 7 Team Fortress 1 9 7 Counter-Strike 1 - Larry -Original Message- From: Zydox [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 15, 2003 11:01 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: SQL Query The result recived from that query is this ID SubID Interest Valid Edit Delete 4 3 Star Craft 1 But I want a Query that retrives Star Craft, Strategi, Spel and Datorer... :/ Willie G [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Zydox, Please define 'sub-interest'. I've looked at what Uttam gave you, and it looks correct, assuming you want want it limited to the same user. If you result should be 'all with Interest = X and Valid = Y, just remove the userid from the second query. SELECT InterestsList.ID, InterestsList.SubID, InterestsList.Interest, InterestsList.Valid FROM InterestsIndex INNER JOIN InterestList ON InterestIndex.InterestID=InterestList.ID WHERE InterestList.SubID='3' AND InterestList.Valid='1' - Larry -Original Message- From: Zydox [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 15, 2003 7:58 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: SQL Query Those querys work... but they don't get all the Sub Interests... Uttam [EMAIL PROTECTED] wrote in message 97FB62E1E350D511B71F00A0C99D0CC30352D563@MSEXCHANGE">news:97FB62E1E350D511B71F00A0C99D0CC30352D563@MSEXCHANGE... if i understand you correctly then this should give valid interests of a user: SELECT DISTINCT InterestsList.SubID FROM InterestsIndex INNER JOIN InterestList ON InterestIndex.InterestID=InterestList.ID WHERE InterestIndex.UserID='1' AND InterestList.Valid='1' and if the chosen interest is '3' then valid subinterests are: SELECT InterestsList.ID, InterestsList.SubID, InterestsList.Interest, InterestsList.Valid FROM InterestsIndex INNER JOIN InterestList ON InterestIndex.InterestID=InterestList.ID WHERE InterestIndex.UserID='1' AND InterestList.SubID='3' AND InterestList.Valid='1' regds, -Original Message- From: Zydox [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 15, 2003 09:48 To: [EMAIL PROTECTED] Subject: SQL Query I have a problem writing a query that can select a Interest for a specific user... There are tvo tables, IList and IIndex... IList contains this : ID SubID Interest Valid Edit Delete 1 0 Datorer 0 Edit Delete 2 1 Spel 0 Edit Delete 3 2 Strategi 0 Edit Delete 4 3 Star Craft 1 Edit Delete 5 3 Star Wars: Gallactic Battelinggrounds 1 Edit Delete 6 2 Shoot-Em-Up 0 Edit Delete 7 6 Half-Life 0 Edit Delete 8 7 Team Fortress 1 Edit Delete 9 7 Counter-Strike 1 And IIndex contains a UserID And InterestID... this query : SELECT DISTINCTROW InterestsList.ID, InterestsList.SubID, InterestsList.Interest, InterestsList.Valid FROM InterestsList AS II RIGHT JOIN InterestsList ON InterestsList.ID=II.SubID LEFT JOIN InterestsIndex ON InterestsList.ID=InterestsIndex.InterestID AND InterestsIndex.UserID='1' Selects all rows from IList... even if there Is'nt any instans in IIndex.. . this thougt is that a User can choose a Valid Interest and then the query should select all SubInterests... anyone know how to do that ? // Regards Zydox -- 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 variable to pass login ID
Hi, I have been trying to solve the problem of using session variables, but I have not had any luck. What I want to do is simple, I want to set my userid and password in a login screen and use it later (in another php form) to log into the database. In my login PHP file I have the following: if(isset($_POST['userid']) isset($_POST['pword'])){ $_SESSION['user'] = $_POST['userid']; $_SESSION['password'] = $_POST['pword']; } In my connect to database PHP file I have: if(isset($_SESSION['user'])){ $user=$_SESSION['user']; echo Print $user; }else{ echo Print Missing User; } The message I always get is Print Missing User, so I must assume the global variable is not working. Can anyone help me out here? Thanks, Larry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] SESSION variable to pass login ID
Tom, I do have a session_start() in both files, but it does not seem to help. - Larry -Original Message- From: Tom Rogers [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 12, 2003 11:36 AM To: Willie G Cc: [EMAIL PROTECTED] Subject: Re: [PHP] SESSION variable to pass login ID Hi, Monday, January 13, 2003, 1:04:49 AM, you wrote: WG Hi, WG I have been trying to solve the problem of using session variables, but I WG have not had any luck. What I want to do is simple, I want to set my userid WG and password in a login screen and use it later (in another php form) to log WG into the database. WG In my login PHP file I have the following: WG if(isset($_POST['userid']) isset($_POST['pword'])){ WG $_SESSION['user'] = $_POST['userid']; WG $_SESSION['password'] = $_POST['pword']; WG } WG In my connect to database PHP file I have: WG if(isset($_SESSION['user'])){ WG $user=$_SESSION['user']; WG echo Print $user; WG }else{ WG echo Print Missing User; WG } WG The message I always get is Print Missing User, so I must assume the WG global variable is not working. Can anyone help me out here? WG Thanks, WG Larry Make sure you have session_start() at the begining of the second file. -- regards, Tom -- 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] SESSION variable to pass login ID
Hi, I just found my mistake. I added some debug logic, and found that the $_POST logic was in the calling form, not the called form. As soon as I moved the if(isset($_POST['userid']) isset($_POST['pword'])){ to the second form, everything started to work. Thanks to everyone who responded. - Larry -Original Message- From: Nova [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 12, 2003 3:04 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] SESSION variable to pass login ID This statement doesnt look right to me. if(isset($_POST['userid']) isset($_POST['pword'])){ $_SESSION['user'] = $_POST['userid']; $_SESSION['password'] = $_POST['pword']; } the if should be: if ((statement)(statement)) { } so: if ((isset($_POST['userid'])) (isset($_POST['pword']))) { $_SESSION['user'] = $_POST['userid']; $_SESSION['password'] = $_POST['pword']; } That should work. Willie G [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Tom, I do have a session_start() in both files, but it does not seem to help. - Larry -Original Message- From: Tom Rogers [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 12, 2003 11:36 AM To: Willie G Cc: [EMAIL PROTECTED] Subject: Re: [PHP] SESSION variable to pass login ID Hi, Monday, January 13, 2003, 1:04:49 AM, you wrote: WG Hi, WG I have been trying to solve the problem of using session variables, but I WG have not had any luck. What I want to do is simple, I want to set my userid WG and password in a login screen and use it later (in another php form) to log WG into the database. WG In my login PHP file I have the following: WG if(isset($_POST['userid']) isset($_POST['pword'])){ WG $_SESSION['user'] = $_POST['userid']; WG $_SESSION['password'] = $_POST['pword']; WG } WG In my connect to database PHP file I have: WG if(isset($_SESSION['user'])){ WG $user=$_SESSION['user']; WG echo Print $user; WG }else{ WG echo Print Missing User; WG } WG The message I always get is Print Missing User, so I must assume the WG global variable is not working. Can anyone help me out here? WG Thanks, WG Larry Make sure you have session_start() at the begining of the second file. -- regards, Tom -- 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] asp to php
RedHat 7.1 (Linux) has a package that converts from ASP to PHP pages. I didn't use it, so I don't know if it is useful neither if it is available for Windows. Kind regards, Willie _ Seja avisado de novas mensagens do Hotmail e use o comunique-se com seus amigos com o MSN Messenger em http://messenger.msn.com.br -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Big difference?
Hi! I am new to the list, so I will present myself before talking about the differente between echo and print. I am a PhD student in Computer Science at the University of Sao Paulo state, Sao Carlos city, Brazil. I use PHP in a system that manages online courses. About the big difference: reading the manual errata of the echo function (available at http://www.php.net/manual/en/function.echo.php), I found a note from [EMAIL PROTECTED] that mentions another WWW document. This document explains the difference: http://www.faqts.com/knowledge_base/view.phtml/aid/1/fid/40 Kind regards, Willie D. Leiva _ Seja avisado de novas mensagens do Hotmail e use o comunique-se com seus amigos com o MSN Messenger em http://messenger.msn.com.br -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]