Re: [PHP] Re: $_GET strings seperation
Hey Jarred, Sorry I couldn't get to you earlier. Thanks again for all the help. And yes, I live maybe about 15-20 min from the new stadium. Take care... Navid On 5/27/07, Jared Farrish [EMAIL PROTECTED] wrote: On May 26, 5:39 pm, [EMAIL PROTECTED] (Navid Yar) wrote: Thanks so much Jarred. It helps me learn more when there's an explaination on how the code works. I'll play around with it, change it a bit and give that a try. Take care... P.S. -- I'm in Arlington, TX I work with a guy from Arlington. Live near the new stadium? Incidentally, ponder this: code function shortGetNewQueryString($arr,$merge) { return array_merge($arr,$merge); } echo('pre'); // Let's do one new cID, new GET key/value $query = Array('cID'=42,'freudian'='slip'); $go = shortGetNewQueryString($_GET,$query); print_r($go); // Let's do one new cID, new GET key/value $query = Array('cID'=9-002,'footloose'='fancy free'); $go = shortGetNewQueryString($go,$query); print_r($go); // Let's do one new cID, new GET key/value $query = Array('cID'=493,'fugged'='dhaboutit'); $go = shortGetNewQueryString($go,$query); print_r($go); // Let's do one new cID, new GET key/value $query = Array('cID'=A4,'longlongtimeago'='in a galaxy far, far away'); $go = shortGetNewQueryString($go,$query); print_r($go); echo('/pre'); /code By the way, when you run that code, pay special attention to the second test. Very very tricky entry anomaly... Wuffuh! Pay attention to how short that new code is ( shortGetNewQueryString() ). It's certainly arguable you don't even need to wrap it in a function. Consider: code // This is the best version, I believe: brief and simple. function mediumGetNewQueryString ($arr,$add) { foreach ($add as $key=$val) { $arr[$key] = $val; } return $arr; } echo('pre'); print_r( mediumGetNewQueryString($_GET,$query) ); echo('pre'); /code And then, of course, a number of shortcuts may be used to obscurify and mystify your code for later puzzling, head-scratchedness. This is, of course, exactly comparable to all the other example methods: code // Hard to read, ie, needless brevity function annoyingGetNewQueryString ($arr,$add) { foreach ($add as $key=$val) $arr[$key] = $val; return $arr; } echo('pre'); print_r( annoyingGetNewQueryString($_GET, $query) ); echo('/pre'); /code Caution: Using array_merge, though, will overwrite keynames, but NOT numerical items. You can't auto-map over numerical keys with array_merge(), apparently. Consider: code $array = Array( [0] = 'moe' [1] = 'curly', [2] = 'larry' ); // Is equivalent to ~ $array = Array(); $array[] 'moe'; $array[] 'curly'; $array[] 'larry'; // Is equivalent to ~ $array = Array(); array_push($array, 'moe'); array_push($array, 'curly'); array_push($array, 'larry'); /code When you add a numerical array in php, it is added to the stack as a new item, or push. Essentially, $array = Array('item1') $array[] = 'item2' eq ~ Array('item1','item2') And then when you call on the array, it { get Array as Numerically-Indexed Set } eq ~ split($array,$token=',') eq ~ ({ [0] = 'item' , [1] = 'item2' }) So an array on a stack can be represeted in memory as a comma-delimited numerically-indexed list, eg, 'item','item2' -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: If the only tool you have is a hammer, you tend to see every problem as a nail. $$ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] $_GET strings seperation
Hello Everyone, I have a problem with GET strings. I use $_SERVER[REDIRECT_QUERY_STRING] to get the value-pairs in the URL. The problem is that there is a cID variable that keeps appending itself to the string continuously everytime someone clicks on a different category link on the website. For example, instead of this: http://www.someexample.com/admin/index.html?cID=42somevar=valuesomevar2=value2 it keeps appending another cID to it everytime it goes to a different link, like this: http://www.someexample.com/admin/index.html?cID=42cID=39cID=44cID=37somevar=valuesomevar2=value2 I know that this is happening because I'm appending it with the dot (.) but is there a way to just inject a single cID and still have the rest of the value-pairs available? Something built into PHP, maybe a different predefined variable I don't know about? Or, do I have to make a complex function to separate each out and then put it back together again like humpty dumpty? Is there an easier way to do this and still have a single cID variable in the GET string? Thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: $_GET strings seperation
Thanks so much Jarred. It helps me learn more when there's an explaination on how the code works. I'll play around with it, change it a bit and give that a try. Take care... P.S. -- I'm in Arlington, TX On 5/26/07, Jared Farrish [EMAIL PROTECTED] wrote: On 5/26/07, Navid Yar [EMAIL PROTECTED] wrote: Hello Everyone, I have a problem with GET strings. I use $_SERVER[REDIRECT_QUERY_STRING] to get the value-pairs in the URL. The problem is that there is a cID variable that keeps appending itself to the string continuously everytime someone clicks on a different category link on the website. For example, instead of this: http://www.someexample.com/admin/index.html?cID=42somevar=valuesomevar2=value2 it keeps appending another cID to it everytime it goes to a different link, like this: http://www.someexample.com/admin/index.html?cID=42cID=39cID=44cID=37somevar=valuesomevar2=value2 I know that this is happening because I'm appending it with the dot (.) but is there a way to just inject a single cID and still have the rest of the value-pairs available? Something built into PHP, maybe a different predefined variable I don't know about? Or, do I have to make a complex function to separate each out and then put it back together again like humpty dumpty? Is there an easier way to do this and still have a single cID variable in the GET string? Thanks in advance. Is this what you're doing: code $cid = getCid(); // However you do set the new, included cid $newlink = 'http://www.someexample.com/admin/index.html?'.$cid. $_SERVER[REDIRECT_QUERY_STRING]; /code ??? If this is similar to what you're doing, this is a fairly problematic way for you to insert a replacement property in a query string. An example of a way to get a new query string: code function getNewQueryString($arr) { $store = Array(); foreach ($_GET as $key=$val) { foreach ($arr as $k=$v) { if (isset($_GET[$k])) { $store[$key] = $v; } } if (!isset($store[$key])) { $store[$key] = $val; } } $i = 0; $str = '?'; $count = count($store); foreach ($store as $key = $val) { $amp = $count-1 !== $i ? 'amp;' : ''; $str .= {$key}={$val}{$amp}; $i++; } return $str; } $query = Array('cID'=42); $newlink = http://www.oompaloompa/land.php.getNewQueryString($query); echo(p$newlink/p); /code What you need to do is transcribe your $_GET string to a new version, replacing the current values that need replacing while retaining all other values. To do this, loop through the $_GET global array, replace those that match $_GET keynames with the new data, and then rebuild the query into a string for inclusion in the link. I'll leave it to you figure out how to add new values that are not replaced ($query=Array('cID'=51,'doesnotexistyet'='completelynewvalue'), for instance). Also, the above is an example; there are certainly many other ways to do what is done above (such as replacing the last foreach loop with an implode() call). There are some strictly unnecessary things done above, in other words, but I left them in to show what really is happening (and needs to be done). -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: If the only tool you have is a hammer, you tend to see every problem as a nail. $$ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: help with multi dimensional arrays
Hello Everyone, I have a problem with GET strings. I use $_SERVER[REDIRECT_QUERY_STRING] to get the value-pairs in the URL. The problem is that there is a cID variable that keeps amending itself to the string continuously everytime someone clicks on a different category link on the website. For example, instead of this: http://www.someexample.com/admin/index.html?cID=42somevar=valuesomevar2=value2 it keeps amending another cID to it everytime it goes to a different link, like this: http://www.someexample.com/admin/index.html?cID=42cID=39cID=44cID=37somevar=valuesomevar2=value2 I know that this is happening because I'm amending it with the dot (.) but is there a way to just inject a single cID and still have the rest of the values available? Something built into PHP, maybe a different predefined variable I don't know about? Or, do I have to make a complex function to separate each out and then put it back together again like humpty dumpty? Is there an easier way to do this and still have a single cID variable in the GET string? Thanks in advance to anyone that contributes, I really appreciate everyone's effort on this list in the past. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help With Recursion Multi-Dimensional Arrays
Hello Guys, I need a little bit of help with recursion. I've searched our PHP website and Google, but none helped me understand my problem. There is a code below this message in order to help you understand what I am trying to achieve. Here is an explaination: What I'm trying to do is list a typical category/subcategory system with parents and children associated with those parents. My database table (categories) lists all the parents and children together, each with a parent_id field (with root being a value of 0). What I want to do is, if a user clicked on one of the parent categories, only one level of that category will show (or only the direct children of that specific category will show). I want the depth to be endless because I want to control the depth some other way. I know that using a recursive theory would cost a lot as far as speed goes, but I'm willing to risk it for now. Here is the problem: The problem is that the recursive method yields several arrays, instead of one long array. I tried to use an array_push() function, but that doesn't seem to work well with multi-dimentional arrays. I tried the straight way, i.e. $menu_array[$count]['name'] = $name_of_category or $menu_array['name'][$count] = $name_of_category, but that yields several arrays instead of one long array or category names. The depth of the categories can be determined by the $_GET string passed, $_GET['some_path'], which is in the format: parent1_child1_grandchild1_grandchild2, etc.($some_path = 1_4_6_8), where all of these are related to each other. These, of course, are split using the underscore delimeter: $path['0'] = 1, $path['1'] = 4, and so on. And finally, here is my question: How do I get all these categories, parents and children, listed into one array and then returned. I want to be able to list them on the web page using one array. I will also include id, parent_id, and other info with each array, but first I want to get the name listings of the categories to work. Also, if anyone has any suggestions about a more speedier way to do this, please let me know. Sorry for the long explaination, I just wanted to make sure you guys understood my goals. Thanks in advance to anyone that responds, I appreciate it very much. Here is the code I promised: - function menu_tree($parent_id = '0', $cPath = '', $menu_array = '') { if (!is_array($menu_array)) { $menu_array = array(); $cPath = $this-separatePath($_GET['cPath']); // separates $_GET string into array of category ids } else { reset($cPath); array_shift($cPath); } if (sizeof($cPath) = 0) { $db = new base_db(); $query = select cid, name, parent_id from categories where parent_id = ' . $parent_id . ' order by sort_order, name;; $categories = $db-fetch_results($query); //echo sizeof($cPath).br /; //echo $query.br /; for ($i = 0, $count = 0; $i count($categories); $i++, $count++) { // The following are the methods I tied, but failed to work //$menu_array['name'][$count] = $categories[$i]['name']; //$menu_array[]['name'] = $categories[$i]['name']; //$menu_array['name'][] = $categories[$i]['name']; //array_push($menu_array, $categories[$i]['name']); // This one works, but does not yeild a multi-dimensional array, which is what I need if I were to add more information to the output of this array, like id and parent_id //array_push($menu_array[$count]['name'], $categories[$i]['name']); // This does not work, gives error saying the first parameter of array_push must be an array if (($this-get_children($categories[$i]['cid'])) in_array($categories[$i]['cid'],$cPath)) { $this-menu_tree($categories[$i]['cid'], $cPath, $menu_array); } } } print_r($menu_array); } - Here is what it returns using the print_r() function on $menu_array Array ( [name] = Array ( [0] = Cars [1] = Honda [2] = Accord [3] = 1996 [4] = 1997 [5] = 1998 [6] = 1999 [7] = 2000 [8] = 2001 [9] = 2002 ) ) Array ( [name] = Array ( [0] = Cars [1] = Honda [2] = Accord [3] = Civic ) ) Array ( [name] = Array ( [0] = Cars [1] = Honda [2] = Toyota ) ) Array ( [name] = Array ( [0] = Cars [1] = Suvs [2] = Trucks ) ) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Image Manipulation/GD support
Hello, I just enabled GD support for PHP via the php.ini file. When I try to run a script that uses the functions included in the library, it gives me a dialog box asking me whether I want to save the php file to a specific location or not. I don't need to save it, I need PHP to run it. This is happening on two machines enabled with the gd library. I'm using PHP 4.0.6, while my remote host machine is using 4.1.1. Do I need a more current version of the GD library to run this script? Here is the script: ?php $image = images/pic.jpg; if (!$max_width) $max_width = 150; if (!max_height) $max_height= 150; $size = GetImageSize($image); $width = $size[0]; $height = $size[1]; $x_ratio = $max_width / $width; $y_ratio = $max_height / $height; if (($width = $max_width) ($height = $max_height)) { $tn_width = $width; $tn_height = $height; } elseif (($x_ratio * $height) $max_height) { $tn_height = ceil($x_ratio * $height); $tn_width = $max_width; } else { $tn_width = ceil($y_ratio * $width); $tn_height = $max_height; } $src = ImageCreateFromJpeg ($image); $dst = ImageCreate ($tn_width, $tn_height); ImageCopyResized ($dst, $src, 0, 0, 0, 0, $tn_width, $tn_height, $width, $height); header (Content-type: image/jpg); ImageJpeg ($dst, null, -1); ImageDestroy ($src); ImageDestroy ($dst); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Image Manipulation/GD support
Rasmus, thanks so much! It's executing. I've run into another problem with this script, but I'll try to figure this one out as best I can first before posting it. Thanks again! :) -Original Message- From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Sent: Saturday, March 23, 2002 4:41 PM To: Navid Yar Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Image Manipulation/GD support Try image/jpeg as your content-type On Sat, 23 Mar 2002, Navid Yar wrote: Hello, I just enabled GD support for PHP via the php.ini file. When I try to run a script that uses the functions included in the library, it gives me a dialog box asking me whether I want to save the php file to a specific location or not. I don't need to save it, I need PHP to run it. This is happening on two machines enabled with the gd library. I'm using PHP 4.0.6, while my remote host machine is using 4.1.1. Do I need a more current version of the GD library to run this script? Here is the script: ?php $image = images/pic.jpg; if (!$max_width) $max_width = 150; if (!max_height) $max_height= 150; $size = GetImageSize($image); $width = $size[0]; $height = $size[1]; $x_ratio = $max_width / $width; $y_ratio = $max_height / $height; if (($width = $max_width) ($height = $max_height)) { $tn_width = $width; $tn_height = $height; } elseif (($x_ratio * $height) $max_height) { $tn_height = ceil($x_ratio * $height); $tn_width = $max_width; } else { $tn_width = ceil($y_ratio * $width); $tn_height = $max_height; } $src = ImageCreateFromJpeg ($image); $dst = ImageCreate ($tn_width, $tn_height); ImageCopyResized ($dst, $src, 0, 0, 0, 0, $tn_width, $tn_height, $width, $height); header (Content-type: image/jpg); ImageJpeg ($dst, null, -1); ImageDestroy ($src); ImageDestroy ($dst); ? -- 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
[PHP] Database Error
Ok guys, I need help with this one. I am getting the error: Error in query: SELECT label FROM menu WHERE id = '1'. Why am I getting this error? It seems right to me. I have the following code to call the class object, and I listed the class below it (I'm fairly new to classes): // Object being called from get.php ?php require(menu.class.php); $obj = new Menu(); echo $obj-get_label(1); ? // Class in the file menu.class.php class Menu { var $hostname; var $user; var $pass; var $db; var $table; function Menu() { $this-set_database_parameters(localhost, username, password, apps, menu); } function set_database_parameters($hostname, $user, $password, $db, $table) { $this-hostname = $hostname; $this-user = $user; $this-password = $password; $this-db = $db; $this-table = $table; } function query($query) { $connection = mysql_connect($this-hostname, $this-user, $this-pass) or die (Cannot connect to database); $ret = mysql_db_query($this-db, $query, $connection) or die (Error in query: $query); return $ret; } function get_label($id) { $query = SELECT label FROM $this-table WHERE id = '$id'; $result = $this-query($query); $row = mysql_fetch_row($result); return $row[0]; } } Thanks to anyone, in advance, that can help me with this one. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Database Error
I'm thinking that it probably has to do with the quoting scheme or something else. I tried it on the command line, and it worked fine. I don't even think it matters what types of quotes I use around the id field. I tried both (single and double) on the command line, and it worked just fine. In other words, the SQL is fine, and there's nothing wrong with it. It must either be how I placed the sql statement into the query or how the class is executed. I'm not sure. It might entirely be something else. But, any help on this is really appreciated. -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 07, 2002 3:51 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Database Error On Wednesday 06 March 2002 17:56, Navid Yar wrote: Ok guys, I need help with this one. I am getting the error: Error in query: SELECT label FROM menu WHERE id = '1'. Why am I getting this error? It seems right to me. I have the following code to call the class object, and I listed the class below it (I'm fairly new to classes): Try plugging your query directly into mysql (at the command-line) to see whether it's a mysql problem or a php one. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* If anything can go wrong, it will. -- Edsel Murphy */ -- 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] Database Error
I changed mysql_db_query() to mysql_query(). I took the quotes away from the id. It still gives me an error: Error in query: SELECT label FROM menu WHERE id = 3 Where else could I be going wrong? -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 07, 2002 4:36 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Database Error On Wednesday 06 March 2002 18:27, Navid Yar wrote: I'm thinking that it probably has to do with the quoting scheme or something else. I tried it on the command line, and it worked fine. I don't even think it matters what types of quotes I use around the id field. I tried both (single and double) on the command line, and it worked just fine. In other words, the SQL is fine, and there's nothing wrong with it. It must either be how I placed the sql statement into the query or how the class is executed. I'm not sure. It might entirely be something else. But, any help on this is really appreciated. If 'id' is a numeric field then you should not use quotes: SELECT label FROM menu WHERE id = 1 If it's a character field then it doesn't matter whether you use single or double quotes. One thing you could try doing is to rewrite your code so that it doesn't use mysql_db_query() as it has been deprecated as of php-4.0.6. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* If Patrick Henry thought that taxation without representation was bad, he should see how bad it is with representation. */ -- 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] Database Error
Yes, Jason. I posted it earlier, but here it is again. // Error I'm getting Error in query: SELECT label FROM menu WHERE id = 3 Warning: Supplied argument is not a valid MySQL result resource in e:\localhost\menu\menu.class.php on line 47 // Object being called from get.php ?php require(menu.class.php); $obj = new Menu(); echo $obj-get_label(1); ? // Class in the file menu.class.php class Menu { var $hostname; var $user; var $pass; var $db; var $table; function Menu() { $this-set_database_parameters(localhost, username, password, apps, menu); } function set_database_parameters($hostname, $user, $password, $db, $table) { $this-hostname = $hostname; $this-user = $user; $this-password = $password; $this-db = $db; $this-table = $table; } function query($query) { $connection = mysql_connect($this-hostname, $this-user, $this-pass) or die (Cannot connect to database); $ret = mysql _query($this-db, $query, $connection) or die (Error in query: $query); return $ret; } function get_label($id) { $query = SELECT label FROM $this-table WHERE id = $id; $result = $this-query($query); $row = mysql_fetch_row($result); return $row[0]; } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Database Error
I just tried that Robert. It still gives me the same error that it did before. There is no error after the mysql_connect. It definitely is connecting. If it didn't connect then it wouldn't pass the query to the database in the first place and spit out an error on the SQL syntax. I checked the syntax on the MySQL command line and it worked just fine. So it's not the syntax either. I don't know what it could be :( -Original Message- From: Robert V. Zwink [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 07, 2002 3:42 PM To: Navid Yar Subject: RE: [PHP] Database Error Could you try changing your query() method to function query($query) { $connection = mysql_connect($this-hostname, $this-user, $this-pass) or die (Cannot connect to database); echo mysql_error(); // put this here $ret = mysql _query($this-db, $query, $connection) or die (Error in query: $query); return $ret; } I think echoing out the mysql_error() will help pinpoint the problem. Seems like it is unable to connect? Robert Zwink http://www.zwink.net/daid.php -Original Message- From: Navid Yar [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 06, 2002 4:42 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Database Error Yes, Jason. I posted it earlier, but here it is again. // Error I'm getting Error in query: SELECT label FROM menu WHERE id = 3 Warning: Supplied argument is not a valid MySQL result resource in e:\localhost\menu\menu.class.php on line 47 // Object being called from get.php ?php require(menu.class.php); $obj = new Menu(); echo $obj-get_label(1); ? // Class in the file menu.class.php class Menu { var $hostname; var $user; var $pass; var $db; var $table; function Menu() { $this-set_database_parameters(localhost, username, password, apps, menu); } function set_database_parameters($hostname, $user, $password, $db, $table) { $this-hostname = $hostname; $this-user = $user; $this-password = $password; $this-db = $db; $this-table = $table; } function query($query) { $connection = mysql_connect($this-hostname, $this-user, $this-pass) or die (Cannot connect to database); $ret = mysql _query($this-db, $query, $connection) or die (Error in query: $query); return $ret; } function get_label($id) { $query = SELECT label FROM $this-table WHERE id = $id; $result = $this-query($query); $row = mysql_fetch_row($result); return $row[0]; } } -- 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] form submission error trapping
George, Good point. I actually like your idea a lot. I have never thought about using $SCRIPT_NAME. You also mentioned using $PATH_INFO to implement elegant (and search-engine safe) urls... below. Can you give me a couple of examples of how I might do this? I always hated the GET strings at the end of the url. Sometimes I redirect a user to the same page two times just to get rid of the trailing GET string. I know that's a bad way of doing it, but it was a temporary thing until I could find a way around it. I would really appreciate your help on this one. Thanks... Navid -Original Message- From: George Whiffen [mailto:[EMAIL PROTECTED]] Sent: Monday, February 18, 2002 7:09 AM To: Navid Yar Subject: Re: [PHP] form submission error trapping Navid, $SCRIPT_NAME is sometimes a safer alternative than $PHP_SELF. The difference is that $PHP_SELF includes $PATH_INFO while $SCRIPT_NAME is just the name of the actual script running. http://www.php.net/manual/en/language.variables.predefined.php This becomes particularly important if you use $PATH_INFO to implement elegant (and search-engine safe) urls e.g. /search/products/myproduct rather than /search.php?category=productskey=myproduct. George Navid Yar wrote: Simply, to send a form to itself, you can use a special variable called $PHP_SELF. Here's an example of how to use it: if ($somevalue) { header(Location: $PHP_SELF); } else { execute some other code... } Here, if $somevalue holds true, it will call itself and reload the same script/file. This code is not very useful at all, but it gets the point across. If you wanted to pass GET variables to this, then you could easily say: header(Location: $PHP_SELF?var=valuevar2=value2var3=value3); ...and so on. You can also use this approach with Sessions if you wanted to turn the values back over to the form page, assuming you had two pages: one for the form, and one for form checking and entry into a database. There are several ways to check forms, whether you want it on one page or span it out to several pages. You just need to be creative in what tools are avaiable to you. Here is an example of how you can pass session values: header(Location: some_file.php??=SID?); Here, whatever variables you've registered in session_register() will be passed to the php page you specify, in this case some_file.php. Hope this helps. Have fun, and happy coding. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to start a secure HTTP session?
-Original Message- From: Janet Valade [mailto:[EMAIL PROTECTED]] Sent: Monday, February 18, 2002 12:15 AM To: gaukia 345; [EMAIL PROTECTED] Subject: Re: [PHP] How to start a secure HTTP session? To have a secure HTTP session, you must be communicating with a secure web server. This is apache. It has nothing to do with PHP or Linux. You classmate was right. The only difference for SSL is that you use https instead of http. To find out if your server can communicate using SSL, try it. If you try to access a web page using https and the server is not a secure server, you will get an error message. Page connot be displayed. If you are using Apache and you installed it yourself, if you did not do extra stuff to make it SSL, then it is not. For more info, go to main apache web site, www.apache.org, and follow links to apache-ssl and mod_ssl. Janet - Original Message - From: gaukia 345 [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 18, 2002 5:43 AM Subject: [PHP] How to start a secure HTTP session? I heard from my coursemates it's just typing https:// instead of http://. 1) To enable secure http (SSL) session, what extensions should I install? To which one: Apache or PHP or Linux? 2) How do I know if my Apache and/or Linux and/or PHP support SSL? Thanx _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- 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] form submission error trapping
Simply, to send a form to itself, you can use a special variable called $PHP_SELF. Here's an example of how to use it: if ($somevalue) { header(Location: $PHP_SELF); } else { execute some other code... } Here, if $somevalue holds true, it will call itself and reload the same script/file. This code is not very useful at all, but it gets the point across. If you wanted to pass GET variables to this, then you could easily say: header(Location: $PHP_SELF?var=valuevar2=value2var3=value3); ...and so on. You can also use this approach with Sessions if you wanted to turn the values back over to the form page, assuming you had two pages: one for the form, and one for form checking and entry into a database. There are several ways to check forms, whether you want it on one page or span it out to several pages. You just need to be creative in what tools are avaiable to you. Here is an example of how you can pass session values: header(Location: some_file.php??=SID?); Here, whatever variables you've registered in session_register() will be passed to the php page you specify, in this case some_file.php. Hope this helps. Have fun, and happy coding. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MySQL error checking/matching
Hello everyone, I have a problem. I have a test database (used to learn MySQL) with a table called customers and a field called email. The email field is set to be unique, so I know that by using: $query = select email from customers where email = $email; I will get one cell with the e-mail address that matches the email address specified by the variable $e-mail. Basically, I want to check to see if the e-mail address set in the variable $email matches the email address in the field named email. But I get an error at the end. Here's the source: Assumptions: - $email is set from a previous page - a database connection is open and the database to be used is selected - session settings will send $error back to the form page if result of if statement below is true $query = select email from customers // Check for duplicate entry . where email = $email; $query = stripslashes($query); $result = mysql_query($query); $num_results = mysql_num_rows($result); // Get the number of rows in database (integer) for ($i = 0; $i $num_results; $i++) { $row = mysql_fetch_array($result); // Return results in an associative array } if($row[email] == $email) { // Check to see if $email matches in database $error = $email has already been registered; header(Location: signup.php??=SID?); exit; } And this produces the following error: Warning: Supplied argument is not a valid MySQL result resource in e:\localhost/book-o-rama/admin/signup_do.php on line 34. What am I doing wrong? Any help would be appreciated... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] i need a free php/mysql host with no ads!
Ok, I don't need a server, as I have plenty. But I just had to say that we need more people like you in our world. You're a very nice guy, Liam. Take it easy... :) -Original Message- From: Liam MacKenzie [mailto:[EMAIL PROTECTED]] Sent: Monday, February 11, 2002 4:19 AM To: Balazs Laszlo; [EMAIL PROTECTED] Subject: Re: [PHP] i need a free php/mysql host with no ads! Okay, you're looking for somewhere to try out your PHP and MySQL skills, correct? I can host these for you on my server, I'm preparing to be a proper host for these things, but not yet ready, therefore there may be some problems. Send me an email back (make sure it doesn't go to the PHP mailing list aswell) with a desired username and password, and I'll make you the following: - An SQL database - A subdomain (http://username.operationenigma.net/) - PHP 4.1.1 access - An FTP account - Unlimited email addresses (POP as well as webmail) - 93% uptime (99% once I've finished upgrading my servers, in a few weeks) You do not have to advertise on your site, and I do not require you to put anything on there about me or my hosting system. If you feel nice you can always put something in there, but it's not required. If you have a proper Domain name, I will host that on my DNS server as well. www.fearfulright.com and www.stupidcomics.com are currently being hosted by me. All that I ask is that you're kind to my system, because I haven't set up a huge amount of security on my webserver just yet. The old saying, don't bite the hand that feeds you. Please don't abuse the system, because if you do, I won't even consider doing anything like this in the future. Also, anyone else out there that needs a platform to test their stuff on, email me and I'll see what I can do. Cheers, Liam - Original Message - From: Balazs Laszlo [EMAIL PROTECTED] To: Liam MacKenzie [EMAIL PROTECTED] Sent: Monday, February 11, 2002 8:08 PM Subject: Re: [PHP] i need a free php/mysql host with no ads! so plz help me! --- Liam MacKenzie [EMAIL PROTECTED] wrote: I can help you... - Original Message - From: Balazs Laszlo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 11, 2002 7:56 PM Subject: [PHP] i need a free php/mysql host with no ads! Hi! I need a free php/mysql host with no ads! Thanks for your answer! __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- 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] Need XML info for PHP -- XML Newbie
Hello everyone, I'm a newbie when it comes to XML. I need to know if there's an easy-to-understand documentation/tutorial online that will help me understand how PHP and XML work together, what software technologies PHP uses to parse XML/XSLT documents, and how to actually build PHP to have support of these parsers available on the Win32 platform. Can anyone help me find some resources? I went to www.php.net and they assume too much about their audience, and therefore it's hard to understand their documentations sometimes. Thanks in advance. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Need XML info for PHP -- XML Newbie
Thanks, Erik! This will do nicely. :) -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 2:07 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Need XML info for PHP -- XML Newbie On Thursday, February 7, 2002, at 03:03 PM, Navid Yar wrote: Hello everyone, I'm a newbie when it comes to XML. I need to know if there's an easy-to-understand documentation/tutorial online that will help me understand how PHP and XML work together, what software technologies PHP uses to parse XML/XSLT documents, and how to actually build PHP to have support of these parsers available on the Win32 platform. Can anyone help me find some resources? I went to www.php.net and they assume too much about their audience, and therefore it's hard to understand their documentations sometimes. Thanks in advance. Ready for a page that has over ten tutorials on the subject? They range in difficulty from Intro to XML to Setting up SOAP/RPC datasystems (or something like that). http://www.devshed.com/Server_Side/XML I just got that in the mail from DevShed a few seconds ago. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Need XML info for PHP -- XML Newbie
Hello everyone, I'm a newbie when it comes to XML. I need to know if there's an easy-to-understand documentation/tutorial online that will help me understand how PHP and XML work together, what software technologies PHP uses to parse XML/XSLT documents, and how to actually build PHP to have support of these parsers available on the Win32 platform. Can anyone help me find some resources? I went to www.php.net and they assume too much about their audience, and therefore it's hard to understand their documentations sometimes. Thanks in advance. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP code organization...
Ok, this is very important to me, but I'm not sure how to explain it well. I am working on a project using PHP that supports about 6 different browsers and browser versions. All the code is in one single file for now, but I will eventually split the code up and call them using several include files. The problem is that when I start writing the code and it doesn't support a specific browser version, I customize the code with some browser sniffing...for example: table tr td width='100' first column /td ?php if ($browser == ns4) { ? td bgcolor=ff second column /td ?php } elseif ($browser == ns6) { ? // using different field-color for this browser version... td bgcolor='ff' second column /td ?php } else { ? // using different field-color for this browser version... td bgcolor='00ff00' second column /td ?php } ? /tr /table This is not a real-world example, but it works for trying to explain my problem. The code is messy. The sniffing is done earlier and is set by $browser, which holds a value depending on which browser the user is using at the moment they access the page. I want this code to look as normal as html can possibly look, with a less ambiguous tree-like flow, in the following format for example: table tr td width='100' first column /td td bgcolor=some_color second column /td /tr /table How would you guys organize the code to where it makes the best use of whichever browser is being used, but with less messy code? I probably haven't explained it well, but if you have any questions please let me know and I'll be more than happy to answer them. By the way, I'm a newbie at PHP, and so far I think it's the best thing that has ever happened to the web. Thanks in advance. :) Navid -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Review of PHP-based content management systems? (Nuke, et al)
Try hotscripts.com. They have rating systems for all kinds of content management systems available. They also give brief descriptions of each and a link to their sites as well. Navid Yar -Original Message- From: Kurt Lieber [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 30, 2001 12:44 PM To: [EMAIL PROTECTED] Subject: [PHP] Review of PHP-based content management systems? (Nuke, et al) Does anyone know of a good, solid review of the top 5 or so PHP-based content management systems? Or, at least which are considered the most popular/widely-used? I'm familiar with PHP-Nuke, but am looking for sites that review/compare other systems as well. --kurt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] XHTML and PHP
David, it works now! Matt Dreer pointed the solution out to me as well. I should have used: ?php echo(?xml version=\1.0\ encoding=\UTF-8\?\n); ? Thanks to both of you! One more simple question. I would like to understand how and why this renders correctly. I look at this script and to me there is no difference between: ? echo(?xml version=\1.0\ encoding=\UTF-8\?\n); ? and the correct solution noted above. Can someone explain this phenomenon to me? Thanks again in advance... Navid Yar -Original Message- From: David Otton [mailto:[EMAIL PROTECTED]] Sent: Saturday, September 29, 2001 2:36 PM To: Navid Yar Cc: [EMAIL PROTECTED] Subject: Re: [PHP] XHTML and PHP On Sat, 29 Sep 2001 13:13:24 -0500, you wrote: The first line of an XHTML document must include an XML processing instruction, as such: ?xml version=1.0 encoding=UTF-8? But PHP will parse it as PHP code because of the question marks. How do I get around this problem? I don't want PHP to read that element as PHP, I want it to leave it alone the way it is. I tried echoing the tag and ? echo(?xml version=\1.0\ encoding=\UTF-8\?\n); ? That approach doesn't work. It treats the string literally and prints: ? echo(?xml version=\1.0\ encoding=\UTF-8\?\n); ? in the HTML. Thanks for trying to help... Weird - it works for me (WML stuff). Are you certain short tags is set to on in the .ini? And other code parses ok? Have you tried : ?php echo(?xml version=\1.0\ encoding=\UTF-8\?\n); ? djo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] The future of PHP or my 2 cents
I think with everyone replying to The future of PHP e-mails and putting in their two cents, we're eventually going to raise that $100,000 in no time. g Navid -Original Message- From: CC Zona [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 30, 2001 3:08 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] The future of PHP or my 2 cents In article 010001c1311e$d86ebb40$[EMAIL PROTECTED], [EMAIL PROTECTED] (Matthew A. Schneider) wrote: Rather than whining about the future of PHP, why don't you be proactive and take on the goal of raising the $100,000 for the project? Although Fred's comments appear rhetorical, the suggestion has some merit. Anyone have a feel for how many PHP devotees are out there? How many people subscribe to this list? Do these numbers make it feasible to ask for a $1-10 contribution? How about $0.02 from each of the 7 million domains running PHP? To continue this (speculative) train of thought: Would it be feasible to collect some kind of contest entry fee, either instead of or in addition to donations toward the prize? If maximum participation were the goal (and I'm not sure that it would/should be, but for the sake of argument...), it might be a way to get entrants intestered in recruiting more entrants by reminding them that more developers in the contest, the bigger the reward to be won by one of them... As for collecting funds for such an endeavor, FWIW I (and presumably others) would be more likely to give if it were through the PHP.net group or Zend than through any third-party. At least then if the contest were to fall through, I'm confident that the money would still be well-spent on furthering PHP development/marketing. -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: line by line
When using fgets() 3 times, does the pointer inside the file change positions? Navid Yar -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 30, 2001 4:57 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: line by line http://php.net/fopen http://php.net/fgets Call fopen. Call fgets 3 times. Call fread($file, 100) to get the rest. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm - Original Message - From: Gary [EMAIL PROTECTED] Newsgroups: php.general To: [EMAIL PROTECTED] Sent: Monday, August 27, 2001 4:10 PM Subject: line by line Hi All, I need to get info from a flat file line by line. What I need to do is get 3 separate lines and then a paragraph. Can someone point me to a tutorial or info on the subject. TIA Gary -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: line by line
Thanks Hugh, that makes a lot of sense. I shall look for further details about these functions and learn more about them. Thanks again for your input. Sincerely, Navid Yar -Original Message- From: Hugh Danaher [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 30, 2001 5:23 PM To: Navid Yar; [EMAIL PROTECTED] Cc: Php-General Subject: Re: [PHP] Re: line by line That I know, calling fgets() 3 times would put the file pointer at the start of the 4th. line. However, fread() won't let you decide the position from which the acquisition begins.. according to my help book. Perhaps the filepointer is in the right spot, perhaps not. fread() requires an fseak() file pointer to offset the start of the file to where you want to begin reading. I hope this helps. hugh - Original Message - From: Navid Yar [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 30, 2001 1:50 PM Subject: RE: [PHP] Re: line by line When using fgets() 3 times, does the pointer inside the file change positions? Navid Yar -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 30, 2001 4:57 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: line by line http://php.net/fopen http://php.net/fgets Call fopen. Call fgets 3 times. Call fread($file, 100) to get the rest. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm - Original Message - From: Gary [EMAIL PROTECTED] Newsgroups: php.general To: [EMAIL PROTECTED] Sent: Monday, August 27, 2001 4:10 PM Subject: line by line Hi All, I need to get info from a flat file line by line. What I need to do is get 3 separate lines and then a paragraph. Can someone point me to a tutorial or info on the subject. TIA Gary -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Sorry, I need HTML help
Yes true, but the MARQUEE tag is deprecated and will no longer work in newer browsers. I don't suggest you use that approach. It's up to you... -Original Message- From: Alexander Deruwe [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 29, 2001 8:15 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Sorry, i need HTML help On Wednesday 29 August 2001 19:08, you wrote: Sorry to post here but i need to know this info fast! How do i make a scrolling marquee in HTML without using javascript You use the MARQUEEInsert scrolling text here/MARQUEE tags. ad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] str_replace() function help
Hello, I am creating an online text editor for a magazine site and I want to be able to apply some CSS formatting into it. The following is the script that adds the br / tags where necessary, then it strips the br / tags by replacing them with some p tags with CSS formatting. The problem I'm having is that it will not pick up on those br / tags (2 at a time). I think it has something to do with the newline (\n) and return (\r) escape characters not capturing the br / tags. Maybe I didn't set it up correctly. Below the code is the input (exactly as typed in the online text editor), the undesired output I'm getting when I run the article through the script, and the desired output that I want. Please Note that I am trying to comply with the XHTML standards and will be converting these into XHTML, therefore all tags must be closed ( example: p/p ), and all empty tags must be closed in this way: tag / ( example: br / ). Also note that I am trying to stay away from other pattern matching and replacing functions. The reason is that str_replace() seems much faster than the rest. If it is possible, I would like to stick with str_replace(). But if this turns out to be too complex for str_replace to handle, then I will consider other options. I am on a Win2000 platform running PHP 4.0.6 (which may or may not be relevant). Thanks in advance this anyone who helps me out with this, I would really appreciate it. THE SCRIPT __ html headtitlestr_replace/title/head body ?php if ($article) { $article = nl2br(htmlspecialchars(stripslashes($article))); $article = p class=\arialnn16\\n . $article . /p\n\n; $article = str_replace(br /\r\nbr /,/p\np class=\arialnn16\\n,$article); echo $article; } else { echo Please include an article before sending.; } ? /body /html INPUT ___ There are numerous definitions for the word hero. I would like to define heroes as individuals who inspire us to emulate their level of perseverance and success. Simply put, heroes are people we look up to. Life is full of celebrated heroes: sports figures, individuals from all walks of the entertainment industry, famous and infamous politicians, and distinguished individuals from the business and science arenas, just to name a few. But for every celebrated hero, there is at least one unsung hero. This Spotlight segment is dedicated to the unsung heroes of our time. Recently, I have been corresponding via email with three very dedicated and talented students from the University of Toronto whom I consider real life heroes. Once you read about their accomplishments as well as their trials and tribulations in life and the positive example they intend to set for the Afghan youths everywhere, I am sure you will agree with my assessment. THE UNDESIRED OUTPUT __ html headtitlestr_replace/title/head body p class=arialnn16 There are numerous definitions for the word hero. I would like to define heroes as individuals who inspire us to emulate their level of perseverance and success. Simply put, heroes are people we look up to. br / br / Life is full of celebrated heroes: sports figures, individuals from all walks of the entertainment industry, famous and infamous politicians, and distinguished individuals from the business and science arenas, just to name a few. But for every celebrated hero, there is at least one unsung hero. This quot;Spotlightquot; segment is dedicated to the unsung heroes of our time. br / br / Recently, I have been corresponding via email with three very dedicated and talented students from the University of Toronto whom I consider real life heroes. Once you read about their accomplishments as well as their trials and tribulations in life and the positive example they intend to set for the Afghan youths everywhere, I am sure you will agree with my assessment./p /body /html DESIRED OUTPUT __ html headtitlestr_replace/title/head body p class=arialnn16 There are numerous definitions for the word hero. I would like to define heroes as individuals who inspire us to emulate their level of perseverance and success. Simply put, heroes are people we look up to. /p p class=arialnn16 Life is full of celebrated heroes: sports figures, individuals from all walks of the entertainment industry, famous and infamous politicians, and distinguished individuals from the business and science arenas, just to name a few. But for every celebrated hero, there is at least one unsung hero. This quot;Spotlightquot; segment is dedicated to the unsung heroes of our time. /p p class=arialnn16 Recently, I have been corresponding via email with three very dedicated and talented students from the University of Toronto whom I consider real life heroes. Once you read about their accomplishments as well as their trials and tribulations in life and the positive example they intend to set for the Afghan youths everywhere, I am sure you will agree with my assessment./p /body /html --
RE: [PHP] str_replace() function help
But that's not the problem. I know str_replace can handle what you just wrote. My problem is replacing TWO br / tags at the same time. Take a look at my script and you'll know what I mean. Can anyone help me with this? -Original Message- From: J Friesen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 28, 2001 11:07 AM To: Navid Yar Cc: Php-General@Lists. Php. Net Subject: RE: [PHP] str_replace() function help This is the code I use for articles that are taken out of a database and the \n need to be changed to paragraphs $art = htmlspecialchars($art); $art = nl2br($art); $art = str_replace(br /, /pp, $art); echo p . $art . /p; -Original Message- From: Navid Yar [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 28, 2001 4:08 AM To: Php-General Subject: [PHP] str_replace() function help Hello, I am creating an online text editor for a magazine site and I want to be able to apply some CSS formatting into it. The following is the script that adds the br / tags where necessary, then it strips the br / tags by replacing them with some p tags with CSS formatting. The problem I'm having is that it will not pick up on those br / tags (2 at a time). I think it has something to do with the newline (\n) and return (\r) escape characters not capturing the br / tags. Maybe I didn't set it up correctly. Below the code is the input (exactly as typed in the online text editor), the undesired output I'm getting when I run the article through the script, and the desired output that I want. Please Note that I am trying to comply with the XHTML standards and will be converting these into XHTML, therefore all tags must be closed ( example: p/p ), and all empty tags must be closed in this way: tag / ( example: br / ). Also note that I am trying to stay away from other pattern matching and replacing functions. The reason is that str_replace() seems much faster than the rest. If it is possible, I would like to stick with str_replace(). But if this turns out to be too complex for str_replace to handle, then I will consider other options. I am on a Win2000 platform running PHP 4.0.6 (which may or may not be relevant). Thanks in advance this anyone who helps me out with this, I would really appreciate it. THE SCRIPT __ html headtitlestr_replace/title/head body ?php if ($article) { $article = nl2br(htmlspecialchars(stripslashes($article))); $article = p class=\arialnn16\\n . $article . /p\n\n; $article = str_replace(br /\r\nbr /,/p\np class=\arialnn16\\n,$article); echo $article; } else { echo Please include an article before sending.; } ? /body /html INPUT ___ There are numerous definitions for the word hero. I would like to define heroes as individuals who inspire us to emulate their level of perseverance and success. Simply put, heroes are people we look up to. Life is full of celebrated heroes: sports figures, individuals from all walks of the entertainment industry, famous and infamous politicians, and distinguished individuals from the business and science arenas, just to name a few. But for every celebrated hero, there is at least one unsung hero. This Spotlight segment is dedicated to the unsung heroes of our time. Recently, I have been corresponding via email with three very dedicated and talented students from the University of Toronto whom I consider real life heroes. Once you read about their accomplishments as well as their trials and tribulations in life and the positive example they intend to set for the Afghan youths everywhere, I am sure you will agree with my assessment. THE UNDESIRED OUTPUT __ html headtitlestr_replace/title/head body p class=arialnn16 There are numerous definitions for the word hero. I would like to define heroes as individuals who inspire us to emulate their level of perseverance and success. Simply put, heroes are people we look up to. br / br / Life is full of celebrated heroes: sports figures, individuals from all walks of the entertainment industry, famous and infamous politicians, and distinguished individuals from the business and science arenas, just to name a few. But for every celebrated hero, there is at least one unsung hero. This quot;Spotlightquot; segment is dedicated to the unsung heroes of our time. br / br / Recently, I have been corresponding via email with three very dedicated and talented students from the University of Toronto whom I consider real life heroes. Once you read about their accomplishments as well as their trials and tribulations in life and the positive example they intend to set for the Afghan youths everywhere, I am sure you will agree with my assessment./p /body /html DESIRED OUTPUT __ html headtitlestr_replace/title/head body p class=arialnn16 There are numerous definitions for the word hero. I would like to define heroes as individuals who inspire us to emulate their level of perseverance and success. Simply put, heroes are people we look up
RE: [PHP] Re: The future of PHP -- accessory libraries
I love PHP, but for the following reason it could be the death of it. All the PHP intellectuals stand up, get together, and solve this problem, or at least give us some reassurance. (I'm only a newbie after all). :) -Original Message- From: Dan Harrington [mailto:[EMAIL PROTECTED]] Sent: Monday, August 27, 2001 6:11 AM To: Geoff Caplan; [EMAIL PROTECTED] Subject: [PHP] Re: The future of PHP -- accessory libraries Geoff Caplan said: I would just like to highlight an issue which I feel has a negative effect on the acceptance of PHP. This is the difficulty of finding, downloading, compiling and installing the various PHP libraries not included in the core distribution. Amen. As a member of a back-to-front web-design firm, we have resorted to hosting many of our customers in-house simply because the ISP that is currently hosting them either refuses to update accessory libraries, refuses us accessibility to update them ourselves, and/or treats the entire idea of their deficient system as incredulous. As a result, we have had certain projects that we had originally budgeted 2 days development and implementation time blow up into 2 month every-other-day negotiation with a hostile ISP complete with phone tag, additional agreement signing, and ultimately domain name transferring (which we should have done in the first place). One thing that I am _shocked_ has fallen by the wayside is payflow pro implementation. Until a short while ago, everyone I spoke with at Verisign tech support about PHP SDK implementation treated PHP like a dirty word and refused to help with it. Messages on php-general were answered by numerous uh, yeah -- tell me how you do it when you find out with conflicting answers from those who had an idea on how to get it to work. There are plenty of work-arounds if you're running your own show, but if you are dealing with a semi-hostile ISP, you are in for it. The ISP wouldn't give us info on where the CERTS were stored (because of security issues they said) so we couldn't put an environment variable pointing to them and use an exec() or passthru() to make it work either. And then the SSL conflicts with payflow pro SDK were laughable. How else would you want to use payflow pro except under an SSL environment? Don't get me wrong, I'm a *rabid* supporter of PHP and if not for it I'd certainly not be where I am right now. :-) My $0.02, Dan Harrington -Original Message- From: Geoff Caplan [mailto:[EMAIL PROTECTED]] Sent: Monday, August 27, 2001 4:26 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: The future of PHP Hi folks I would just like to highlight an issue which I feel has a negative effect on the acceptance of PHP. This is the difficulty of finding, downloading, compiling and installing the various PHP libraries not included in the core distribution. Many quite important libraries seem to be persoanl projects which are not supported by the core team, and are hosted on sites that can be down for days at a time. On Linux, many still require a re-compile, there is no documentation standard, and no central repository. This compares badly with platforms such as Perl and Java, who tackled this issue long ago. My own ISP, who is one of the few to offer all PHP MySQL upgrades as they are released, complains about this bitterly. The upshot is that shared hosting rarely offers more than the core functionality, which can be very restrictive. Setting up your own server can be daunting and time consuming - and the commercial distros such as Zend and Nusphere don't seem to have tackled the library issue either. In terms of acceptability in the market, I suspect that this creates a negative impression. It seems to me that this is a quite central issue if PHP is to be perceived as a mature platform for building mission critical systems. I do hope that the development team, and those such as Zend who are committed to the future of PHP give this some attention. Geoff Caplan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP mysql admin?
Thank you! :) Navid Yar -Original Message- From: Christian Dechery [mailto:[EMAIL PROTECTED]] Sent: Monday, August 27, 2001 8:58 PM To: Joseph Bannon; PHP (E-mail) Subject: RE: [PHP] PHP mysql admin? phpMyAdmin is very nice... but not even close to Mysqlfront... try it out... http://www.mysqlfront.de/ At 10:38 27/8/2001 -0500, Joseph Bannon wrote: Thanks. I'll give it a try. Joseph -Original Message- Try phpMyAdmin http://phpwizard.net/ - Original Message - Are there any free PHP mysql database admin programs out there? p.s: meu novo email é [EMAIL PROTECTED] . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP mysql admin?
I downloaded it and it was fine for me. Installation only requires you to unzip the files into some folder and run the Executable. Very easy and quick. I like it, so far. I like the GUI better than phpMyAdmin... -Original Message- From: Chris Fry [mailto:[EMAIL PROTECTED]] Sent: Monday, August 27, 2001 9:36 PM To: Christian Dechery Cc: Joseph Bannon; PHP (E-mail) Subject: Re: [PHP] PHP mysql admin? Tried to download this but it bombs after about 55k of the 895k. Seriously broken Chris Christian Dechery wrote: phpMyAdmin is very nice... but not even close to Mysqlfront... try it out... http://www.mysqlfront.de/ At 10:38 27/8/2001 -0500, Joseph Bannon wrote: Thanks. I'll give it a try. Joseph -Original Message- Try phpMyAdmin http://phpwizard.net/ - Original Message - Are there any free PHP mysql database admin programs out there? p.s: meu novo email é [EMAIL PROTECTED] . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer -- Chris Fry Quillsoft Pty Ltd Specialists in Secure Internet Services and E-Commerce Solutions 10 Gray Street Kogarah NSW 2217 Australia Phone: +61 2 9553 1691 Fax: +61 2 9553 1692 Mobile: 0419 414 323 eMail: [EMAIL PROTECTED] http://www.quillsoft.com.au You can download our Public CA Certificate from:- https://ca.secureanywhere.com/htdocs/cacert.crt ** This information contains confidential information intended only for the use of the authorised recipient. If you are not an authorised recipient of this e-mail, please contact Quillsoft Pty Ltd by return e-mail. In this case, you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. This e-mail and any attachments may also contain copyright material belonging to Quillsoft Pty Ltd. The views expressed in this e-mail or attachments are the views of the author and not the views of Quillsoft Pty Ltd. You should only deal with the material contained in this e-mail if you are authorised to do so. This notice should not be removed. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: escaping special characters upon submit
Try this: $text = nl2br(htmlspecialchars(stripslashes($text))); With $text being the data outputted. It will replace apostrophes, quotes, etc. with their proper html formatting. Example: input: PHP is Cool! html output: quot;PHP is Cool!quot; Then if you don't want the $quot;, or whatever is outputted depending on the input, you can write a script to strip them out if you like. There are lots of things you can do from this point. Anyway, hope that helps you out... Navid -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Saturday, August 25, 2001 2:49 PM To: Sunil Jagarlamudi; [EMAIL PROTECTED] Subject: [PHP] Re: escaping special charecters upon submit I have a form that submits data to a database, works great until someome puts in an apostrophe in the comments area...how do i escape this charecter upon insert? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] text wrap in table
Have you tried using the nobr tag along with the pre tag? The nobr tag will not allow the text to wrap. You can use it outside the pre tags and see what you come up with. It sounds simple, but it may provide you with the solution that you need. Navid -Original Message- From: Adrian D'Costa [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 11:36 PM To: php general list Subject: [PHP] text wrap in table Hi, I am creating a program for a newspaper to publish their article online. There is a form what allows them to cut and past from their editors (word, pagemaker, staroffice). The data is being entered correctly. The problem is when I try and get the data from the table the whole matter scrolls off the screen. I need it to be formatted as the client cut and pastes it (headings, paras, etc). Below is my table and part of my program. mysql desc newsarticles; +--+--+--+-+++ | Field| Type | Null | Key | Default| Extra | +--+--+--+-+++ | id | int(5) | | PRI | NULL | auto_increment | | nid | int(5) | | MUL | 0 || | headline | varchar(100) | | ||| | article | mediumtext | | ||| | date | date | | | -00-00 || | imgpath | varchar(200) | YES | | NULL || +--+--+--+-+++ html head title? echo $row-headline; ?/title /head body bgcolor=white h1 align=center? echo $row-headline; ?/h1 h3 align=center? echo $row-description; ?/h3 table width=600 border=1 tr td valign=top width=70%font face=Arial size=2 color=bluestrong? echo $sd .-. $sm .-. $sy; ?/strongbrpre? echo $row-article; ?/pre/font/td td valign=top width=30%img src=? echo $row-imgpath; ? ? echo $iwh[3]; ? /td /tr /table /body /html I use the pre/pre to display with the line breaks. If I take of the pre it does not wrap but does not give the breaks. To my thinking maybe while entering the data we should give break the lines physically. This is part of my entry form. tr tdfont face=Arial size=2HeadLine/font/td tdinput type=text name=headline size=30 /tr tr tdfont face=Arial size=2Article/font/td tdtextarea name=article cols=60 rows=10/textarea/td /tr tr tdfont face=Arial size=2Upload Image/font/td tdinput type=file name=userfile size=30 wrap=ON/td /tr tr align=center td colspan=2input type=submit value=Submit/td /tr How do I get the text not to wrap and to preserve the formatting given by the client. Adrian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] The future of PHP
There are big players who have an eye on the open-source market right now, IBM being the biggest contributor. HP recently released their own Linux version on their desktop PCs and is marketing them as we speak. Microsoft is planning on giving away just part of their source code in their future products to software developers. Everyone has felt the heat on Open Source technology, and everyone knows it is the way to go. The only thing that is missing from most Open Source products, probably excluding PHP, is user-friendliness. There are a lot of computer illiterate people out there that have gotten used to the click and drag features that make using an application so easy, but they never dream of going into a command line and typing in something. Right now Linux is easy to use thanks to the abundance of different GUIs out there, but there is no standard, like Windows has. Also it is harder to set-up for newbies than Windows is (not really, but for the newbie it's a whole different world). It is a new concept that users must grab in order to make good use of it. There must be a way that people can link MS-like features into Linux a bit more so that at least it will make it easier for people to make that transition over to a different OS and try it out. After it has the market share it needs, users will have gotten used to Linux or BSD or whatever and we can do what MS does, promote a bunch of Linux-specific features into the OS. By that time they will have grabbed the concept of free so much that Windows would sound ridiculously pricey (especially the licensing). MS can't afford to give it's OS away for free, just like it could give away it's IE browser and break Netscape. That's why Open Source is the first real challenge for MS in 15 years. THEN follows the marketing, where everyone will be backing up Linux because of it's popularity and low cost, compared to Windows. And we'll see Bill Gates crawling on his knees and selling his Ferraris to pay his mortgage. Wouldn't I love to see that, just kidding. Until Linux gets better at certain things, I think I have no choice but to stick with Windows for now (especially in the design area). Anyway, that's my two cents worth. Navid P.S. -- When I say Linux, I mean all Open Source products, including PHP. Linux is just the driving force. And Christopher, keep up the promotion of PHP, you have some great ideas. I want it to grow as much as you do. Thanks :) -Original Message- From: Manuel Lemos [mailto:[EMAIL PROTECTED]] Sent: Friday, August 24, 2001 12:57 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] The future of PHP Hello, Christopher Cm Allen wrote: I'm afraid that PHP is not yet very credible in that world. The truth is there is not great marketing force behind PHP like there is Sun behind Java or Microsoft behind .Net Good point, and how does one go about marketing a language that is open-source? If you don't know it is because you are not very motivated to do it. So, the first step is to convince and motivate yourself that PHP needs to be marketed. As for what to do, instead of suggesting new ideas, I would rather recall some old ideas that always seemed to work well. For instance, provide PHP users compensation. It does not need to be financial compensation. It may be moral compensation as long as it is real compensation. For instance, if I am not mistaken, Guido Van Rossum, the Python creator, sponsored a contest to develop software development tools with cash prizes. Only a few won, but the contest attracted a lot of people and was even mentioned in prestiged software development magazines like Dr. Dobbs. This required some investment, but if you look around you will not have much trouble to find a sponsor. Another point is that they managed to get the media on their side. It seems that in the PHP community there is little effort to appeal to media. That is a major waste of oppiortunity because they can provide some much marketing for free. One free way to provide compensation to any PHP user is to promote their work. 2 years ago I started a repository of PHP Classes of objects that basically allow anybody to contribute regardless of the quality and utility that you may attribute to what is contributed. The point is that once users that anybody can have some fame to have his work exposed to a large PHP audience (over 40.000 subscribers), they want to contribute as well and the site grows thanks to the moral compensation that it offers to any PHP user. There are other class repositories, like the official PHP PEAR repository, but the scope is different because the contributions are not accepted arbitrarily, so you don't get as many contributors. Other than that, PHP resources sites like these should be officially linked altogether with things like Web rings. It would cause a much better impression to newcomers or ceptic people as it would make PHP more credible exposing the real level of support that the whole PHP
RE: [PHP] Concept of Templates
But how? Are there any examples that I can take a look at somewhere? I would love to see some. I've always wondered about how the links work to trigger the template creation. Are there any samples or tutorials of that online? Usually all I see is how the templates are created, but nothing of how it is linked together in a link management system... Does the link itself send any information someplace that tells the server what information is needed and how it has to be performed or placed? By definition, this must be true. (Short of some stupid JavaScript hack that would really suck...) You'll have to design your system such that everything you need to build a page can be encompassed within that URL. Hello everyone, I have a simple question, and I hope I ask it correctly without any confusion. I want to build my own template scheme without using any 3rd party, ready-made freeware template codes. But I am confused about one thing. I am building a content driven website. The templates (such as html headers, footers, style sheets, etc) will be placed in text files and called in as includes, but the content will be placed in a database. The thing I'm confused about is the concept behind linking these articles together in a main TOC (table of contents) page. When one clicks on a topic from a main TOC page, how does the server know which article to pull from the database and place into a particular template? Does the link itself send any information someplace that tells the server what information is needed and how it has to be performed or placed? I hope this doesn't sound too confusing. If anyone needs me to clear it up a bit more, please let me know and I'll try my best. For those of you who know what I'm talking about, what is the concept behind templates, especially the links to those templates? Thanks in advance... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Concept of Templates
Hello everyone, I have a simple question, and I hope I ask it correctly without any confusion. I want to build my own template scheme without using any 3rd party, ready-made freeware template codes. But I am confused about one thing. I am building a content driven website. The templates (such as html headers, footers, style sheets, etc) will be placed in text files and called in as includes, but the content will be placed in a database. The thing I'm confused about is the concept behind linking these articles together in a main TOC (table of contents) page. When one clicks on a topic from a main TOC page, how does the server know which article to pull from the database and place into a particular template? Does the link itself send any information someplace that tells the server what information is needed and how it has to be performed or placed? I hope this doesn't sound too confusing. If anyone needs me to clear it up a bit more, please let me know and I'll try my best. For those of you who know what I'm talking about, what is the concept behind templates, especially the links to those templates? Thanks in advance... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP and XHTML
Hello Manuel, So you suggest that I use the name attribute in XHTML and ignore the fact that it has been depreciated and replaced by the ID attribute? Will that solve my problem? Navid Yar -Original Message- From: Manuel Lemos [mailto:[EMAIL PROTECTED]] Sent: Sunday, May 20, 2001 11:49 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] PHP and XHTML Hello Navid, On 18-May-01 19:44:55, you wrote: I would like to start using the XHTML syntax for my future projects, but I heard that PHP is not compatible with XHTML. For example, in XHTML the ID attribute is used in place of the deprecated NAME tag. But PHP depends on the NAME attribute in forms, etc. Is there any way around this? Has anyone used XHTML and PHP together successfully, and if so how did you get around the previously mentioned problem? Any help woould be much appreciated, thanks in advance. That's not a PHP problem. PHP just processes form values sent by the browser. It is up to the browser to pick the field names when the form is submitted. Anyway, I think that browsers will always pick the field names from the NAME attribute to keep backwards compatibility. Regards, Manuel Lemos Web Programming Components using PHP Classes. Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED] -- E-mail: [EMAIL PROTECTED] URL: http://www.mlemos.e-na.net/ PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Expense
Clayton, you might want to try hotscripts.com. They have a load of scripts you can choose from, and it's all categorized as well. Good luck Navid Yar -Original Message- From: Clayton Dukes [mailto:[EMAIL PROTECTED]] Sent: Saturday, May 19, 2001 2:22 PM To: [EMAIL PROTECTED] Subject: [PHP] Expense Does anyone know where I can find some type of Expense Report/Tracking system written in PHP? I'm tired of tracking all my stuff in Excel and sending it in so I thought I'd take a crack at making an online tracking system for multiple employees that could possibly export to Excel if needed. Thanks for any help :-) Clayton Dukes CCNA, CCDA, CCDP, CCNP Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net
[PHP] PHP and XHTML
Hello, I would like to start using the XHTML syntax for my future projects, but I heard that PHP is not compatible with XHTML. For example, in XHTML the ID attribute is used in place of the deprecated NAME tag. But PHP depends on the NAME attribute in forms, etc. Is there any way around this? Has anyone used XHTML and PHP together successfully, and if so how did you get around the previously mentioned problem? Any help woould be much appreciated, thanks in advance. Navid Yar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Authentication
Kath, Thank you, I completely forgot to strip the UserID and Password to MySQL. The book is called PHP, Fast Easy Web Development by Julie C. Meloni. The errata is located at the somewhat famous www.thickbook.com (more specifically http://www.thickbook.com/books/index.phtml, the book is the first book listed on that page). The errata was helpful in some situations where mistakes were noticable, but it doesn't go any further and it didn't help solve the current problem I'm having. Perhaps I could have made a mistake in the coding, who knows. All I know is that I tried checking and rechecking my code and it looks fine to me. It is also the exact script from the book, yet with the errata's corrections applied as well. Any help from you or any of our other collegues on this newsgroup would be helpful. Thank you for your response and attempt to help. Navid Yar -Original Message- From: Kath [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 19, 2001 4:06 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] Authentication In the future, do not post your mysql password on the list Just a little piece of advice ;) Also, try checking the online errata for the book (You didn't mention which book so I can't point you in the right direction). - Kath - Original Message - From: "Navid Yar" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 19, 2001 4:59 PM Subject: [PHP] Authentication Hello, I'm somewhat new to PHP. I'm having problems with a script and I don't know why. It is from a book, yet it does not work for some reason. Both Apache and MySQL are on and are working fine on my system. The code deals with creating tables within a database (the database already exists. The error is that it could connect to the database, but couldn't create the table within the specified DB. Below are two PHP files that work together for this specific project. Any help with this is much appreciated. Here are the scripts: Script #1 ?php // Check that the user entered the info. If not then direct them back to the form if ((!$table_name) || (!$num_fields)) { header ("Location: http://localhost/examples/dynamic/authentication/auth_app/show_createtable.h tml"); exit; } $form_block = "form method=\"post\" action=\"do_createtable.php\" input type=\"hidden\" name=\"table_name\" value=\"$table_name\" table cellspacing=\"5\" cellpadding=\"5\" tr thFIELD NAME/ththFIELD TYPE/ththFIELD LENGTH/th/tr "; for ($i = 0; $i $num_fields; $i++) { $form_block .= "tr td align=\"center\"input type=\"text\" name=\"field_name[]\" size=\"30\"/td td align=\"center\" select name=\"field_type[]\" option value=\"char\"char/option option value=\"date\"date/option option value=\"float\"float/option option value=\"int\"int/option option value=\"text\"text/option option value=\"varchar\"varchar/option /select /td td align=\"center\"input type=\"text\" name=\"field_length[]\" size=\"5\"/td "; } $form_block .= "tr td align=\"center\" colspan=\"3\"input type=\"submit\" value=\"Create Table\"/td /tr /table /form "; ? html head titleCreate a Database Table: Step 2/title /head body h1Define fields for ?php echo "$table_name"; ?/h1 ?php echo "$form_block"; ? /body /html Script #2 ?php $db_name="testDB"; $connection = @mysql_connect("localhost", "afghan", "office939") or die ("Couldn't connect."); $db = @mysql_select_db($db_name, $connection) or die("Couldn't select database."); $sql = "CREATE TABLE $table_name ("; for ($i = 0; $i count($field_name); $i++) { $sql .= "$field_name[$i] $field_type[$i]"; if ($field_length[$i] != "") { $sql .= "(field_length[$i]),"; } else { $sql .= ","; } } $sql = substr($sql, 0, -1); $sql .= ")"; $result = @mysql_query($sql,$connection) or die("Couldn't execute query."); if ($result) { $msg = "p$table_name has been created!/p"; } ? html head titleCreate a Database Table: Step 3/title /head body h1Adding tabl
RE: [PHP] mail() and stripslashes()
Isaac, Something like this worked for me... ?php if ($article) { print stripslashes(nl2br($article)); } else { print 'Please a href="1.php"go back/a and type an article before sending.'; } ? Where $article would be the e-mail sent out in raw form. -Original Message- From: Isaac Force [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 19, 2001 4:03 PM To: [EMAIL PROTECTED] Subject: [PHP] mail() and stripslashes() I'm using the mail() function to send email out via the web, and I've run in a problem with escaped characters showing the slash in the emails. I get the text for the email ($email_text, lets say) and then I strip the slashes and put the new version in another variable ($nice_email_text). When using the mail function, $nice_email_text is the data that gets sent out, but the slashes in the escaped characters still show up in the messages. (With OE) Any ideas what would be causing this? The scripts I've made are sending out emails to customers, and I don't want all the " and ' characters to show up with slashes next to them. -- 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] Authentication
Hello, I'm somewhat new to PHP. I'm having problems with a script and I don't know why. It is from a book, yet it does not work for some reason. Both Apache and MySQL are on and are working fine on my system. The code deals with creating tables within a database (the database already exists. The error is that it could connect to the database, but couldn't create the table within the specified DB. Below are two PHP files that work together for this specific project. Any help with this is much appreciated. Here are the scripts: Script #1 ?php // Check that the user entered the info. If not then direct them back to the form if ((!$table_name) || (!$num_fields)) { header ("Location: http://localhost/examples/dynamic/authentication/auth_app/show_createtable.h tml"); exit; } $form_block = "form method=\"post\" action=\"do_createtable.php\" input type=\"hidden\" name=\"table_name\" value=\"$table_name\" table cellspacing=\"5\" cellpadding=\"5\" tr thFIELD NAME/ththFIELD TYPE/ththFIELD LENGTH/th/tr "; for ($i = 0; $i $num_fields; $i++) { $form_block .= "tr td align=\"center\"input type=\"text\" name=\"field_name[]\" size=\"30\"/td td align=\"center\" select name=\"field_type[]\" option value=\"char\"char/option option value=\"date\"date/option option value=\"float\"float/option option value=\"int\"int/option option value=\"text\"text/option option value=\"varchar\"varchar/option /select /td td align=\"center\"input type=\"text\" name=\"field_length[]\" size=\"5\"/td "; } $form_block .= "tr td align=\"center\" colspan=\"3\"input type=\"submit\" value=\"Create Table\"/td /tr /table /form "; ? html head titleCreate a Database Table: Step 2/title /head body h1Define fields for ?php echo "$table_name"; ?/h1 ?php echo "$form_block"; ? /body /html Script #2 ?php $db_name="testDB"; $connection = @mysql_connect("localhost", "afghan", "office939") or die ("Couldn't connect."); $db = @mysql_select_db($db_name, $connection) or die("Couldn't select database."); $sql = "CREATE TABLE $table_name ("; for ($i = 0; $i count($field_name); $i++) { $sql .= "$field_name[$i] $field_type[$i]"; if ($field_length[$i] != "") { $sql .= "(field_length[$i]),"; } else { $sql .= ","; } } $sql = substr($sql, 0, -1); $sql .= ")"; $result = @mysql_query($sql,$connection) or die("Couldn't execute query."); if ($result) { $msg = "p$table_name has been created!/p"; } ? html head titleCreate a Database Table: Step 3/title /head body h1Adding table to ?php echo "$db_name"; ?.../h1 ?php echo "$msg"; ? /body /html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Want a Good Book for Ref on PHP
You know, I was wondering the same thing. My situation is the same. My opinion is that the professional version probably strips out most of the beginner's content and adds more advanced php content and dives into everything in more detail rather than just trying to get a beginner off their feet by providing simple tasks Wrox is a great company, they come out with books that are the most comprehensive. Both versions might be a good investment for hardcore php programmers. Best thing to do is to just stop by a barnes and nobles bookstore and start looking through both books to see which one is best for you. Navid -Original Message- From: Martin Skjoldebrand [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 12:53 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Want a Good Book for Ref on PHP Kath wrote: Professional PHP Programming: http://www.amazon.com/exec/obidos/ASIN/1861002963/qid=987388364/sr=1-12/ref= sc_b_13/002-2263539-0333643 I've got Beginning PHP 4 (recommended) on the back cover of which it says that the next book could be "Professional PHP Programming.". However from what I saw in the book shop they cover lots of the same ground. I (and my employer) wouldn't like to pay for the same stuff again. Is there a significant difference between the two? Martin S. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Counter Help
Actually, I couldn't find the article number for that tutorial. I did, however, place a comment directly into that specific web page with the fix. Here is a direct link to the tutorial (I left the frames out): http://www.weberdev.com/ViewArticle.php3?ArticleID=30. Thanks. Navid -Original Message- From: Boaz Yahav [mailto:[EMAIL PROTECTED]] Sent: Friday, February 23, 2001 12:50 AM To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] Subject: RE: [PHP] Counter Help WeberDev will fix it ASAP if you tell it the number of the example :) Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: Navid Yar [mailto:[EMAIL PROTECTED]] Sent: Friday, February 23, 2001 6:25 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] Counter Help Chris, It worked! Thanks so much! Weberdev needs to fix it too. Navid -Original Message- From: Chris Lee [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 22, 2001 4:46 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Counter Help change $row[count] to $row['count'] it thinks the work [count] is some kind of conastant, it doesnt know you mean (string) 'count' -- Chris Lee Mediawaveonline.com ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120 [EMAIL PROTECTED] ""Navid Yar"" [EMAIL PROTECTED] wrote in message 000101c09d2d$135683e0$[EMAIL PROTECTED]">news:000101c09d2d$135683e0$[EMAIL PROTECTED]... Can someone help me with this script? It is an example from weberdev.com. I ran it and it gave me the following error... -- Warning: Use of undefined constant count - assumed 'count' in c:\windows\desktop\localhost\examples\counter\counter1.php on line 27 25 The number 25 is the correct number for the counter, but how do I get rid of that error message that keeps coming up before the counter number (25)? I am testing and learning PHP on Windows ME and am using PHP 4.0.4 with MySQL 3.23.33. Here is the script: HTML HEAD TITLE/TITLE /HEAD BODY !-- This example from http://www.weberdev.com/index.php3?GoTo=ShowShoppingItems.php3%3FMasterCateg -- ?php $hostname = 'localhost'; $username = 'username'; $password = 'password'; $dbName = 'database'; MYSQL_CONNECT($hostname,$username,$password) OR DIE("Unable to connect to database"); @mysql_select_db("$dbName") or die("Unable to select database"); $name = "$SCRIPT_NAME"; $result = MYSQL_QUERY("SELECT * FROM counter WHERE (name = '$name')") or die ("Bad query: ".mysql_error()); $row = mysql_fetch_array($result); if($row){ MYSQL_QUERY("UPDATE counter SET count = count+1 WHERE (name = '$name')") or die ("Bad query: ".mysql_error()); $count = $row[count]; }else{ MYSQL_QUERY("INSERT INTO counter VALUES ('', '$name', '2')") or die ("Bad query: ".mysql_error()); $count = '1'; } echo $count; ? /BODY /HTML -- Navid -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Counter Help
Thank you very much :) -Original Message- From: Boaz Yahav [mailto:[EMAIL PROTECTED]] Sent: Friday, February 23, 2001 4:55 AM To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] Subject: RE: [PHP] Counter Help Fixed. Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: Navid Yar [mailto:[EMAIL PROTECTED]] Sent: Friday, February 23, 2001 10:39 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] Counter Help Actually, I couldn't find the article number for that tutorial. I did, however, place a comment directly into that specific web page with the fix. Here is a direct link to the tutorial (I left the frames out): http://www.weberdev.com/ViewArticle.php3?ArticleID=30. Thanks. Navid -Original Message- From: Boaz Yahav [mailto:[EMAIL PROTECTED]] Sent: Friday, February 23, 2001 12:50 AM To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] Subject: RE: [PHP] Counter Help WeberDev will fix it ASAP if you tell it the number of the example :) Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: Navid Yar [mailto:[EMAIL PROTECTED]] Sent: Friday, February 23, 2001 6:25 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] Counter Help Chris, It worked! Thanks so much! Weberdev needs to fix it too. Navid -Original Message- From: Chris Lee [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 22, 2001 4:46 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Counter Help change $row[count] to $row['count'] it thinks the work [count] is some kind of conastant, it doesnt know you mean (string) 'count' -- Chris Lee Mediawaveonline.com ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120 [EMAIL PROTECTED] ""Navid Yar"" [EMAIL PROTECTED] wrote in message 000101c09d2d$135683e0$[EMAIL PROTECTED]">news:000101c09d2d$135683e0$[EMAIL PROTECTED]... Can someone help me with this script? It is an example from weberdev.com. I ran it and it gave me the following error... -- Warning: Use of undefined constant count - assumed 'count' in c:\windows\desktop\localhost\examples\counter\counter1.php on line 27 25 The number 25 is the correct number for the counter, but how do I get rid of that error message that keeps coming up before the counter number (25)? I am testing and learning PHP on Windows ME and am using PHP 4.0.4 with MySQL 3.23.33. Here is the script: HTML HEAD TITLE/TITLE /HEAD BODY !-- This example from http://www.weberdev.com/index.php3?GoTo=ShowShoppingItems.php3%3FMasterCateg -- ?php $hostname = 'localhost'; $username = 'username'; $password = 'password'; $dbName = 'database'; MYSQL_CONNECT($hostname,$username,$password) OR DIE("Unable to connect to database"); @mysql_select_db("$dbName") or die("Unable to select database"); $name = "$SCRIPT_NAME"; $result = MYSQL_QUERY("SELECT * FROM counter WHERE (name = '$name')") or die ("Bad query: ".mysql_error()); $row = mysql_fetch_array($result); if($row){ MYSQL_QUERY("UPDATE counter SET count = count+1 WHERE (name = '$name')") or die ("Bad query: ".mysql_error()); $count = $row[count]; }else{ MYSQL_QUERY("INSERT INTO counter VALUES ('', '$name', '2')") or die ("Bad query: ".mysql_error()); $count = '1'; } echo $count; ? /BODY /HTML -- Navid -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] books
I think Wrox is a very good reference for any language. I have an XSLT reference from Wrox and it has helped me tremendously because it is so comprehensive (includes online reference material). I'm sure the PHP book from Wrox is just as good. Another great book for PHP, especially for beginners, is The PHP Bible. Navid -Original Message- From: Phillip Bow [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 22, 2001 4:52 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] books Personally I started with the Wrox Professional PHP Programming guide and still use it today(its sittin in front of me). I see they have one out now for php4 which is around $60 which I am probably going to order just to keep up to date. They cover the basics and then go into some more specific sections(broken into chapters) on useful technologies you can integrate with such as XML, LDAP, and MySQL all the while providing good reference sections in each chapter and sample code. If you haven't figured it out already I'd recommend the wrox book. -- phill The WROX books are popular. Also, check out the archives for previous discussions : http://marc.theaimsgroup.com/?l=php-generalr=1w=2q=bs=book Regards, Philip Olson http://www.cornado.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP 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] Counter Help
Can someone help me with this script? It is an example from weberdev.com. I ran it and it gave me the following error... -- Warning: Use of undefined constant count - assumed 'count' in c:\windows\desktop\localhost\examples\counter\counter1.php on line 27 25 The number 25 is the correct number for the counter, but how do I get rid of that error message that keeps coming up before the counter number (25)? I am testing and learning PHP on Windows ME and am using PHP 4.0.4 with MySQL 3.23.33. Here is the script: HTML HEAD TITLE/TITLE /HEAD BODY !-- This example from http://www.weberdev.com/index.php3?GoTo=ShowShoppingItems.php3%3FMasterCateg -- ?php $hostname = 'localhost'; $username = 'username'; $password = 'password'; $dbName = 'database'; MYSQL_CONNECT($hostname,$username,$password) OR DIE("Unable to connect to database"); @mysql_select_db("$dbName") or die("Unable to select database"); $name = "$SCRIPT_NAME"; $result = MYSQL_QUERY("SELECT * FROM counter WHERE (name = '$name')") or die ("Bad query: ".mysql_error()); $row = mysql_fetch_array($result); if($row){ MYSQL_QUERY("UPDATE counter SET count = count+1 WHERE (name = '$name')") or die ("Bad query: ".mysql_error()); $count = $row[count]; }else{ MYSQL_QUERY("INSERT INTO counter VALUES ('', '$name', '2')") or die ("Bad query: ".mysql_error()); $count = '1'; } echo $count; ? /BODY /HTML -- Navid -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Counter Help
Thanks for the great suggestion Simon, I'll definatley keep that in mind. I'm new to PHP, and the counter thing was "copied" off of Weberdev.com. They forgot to add the single quotes around counter. At least this experience helped me learn something new. Again, I thank you for your help and for Chris' help. Navid -Original Message- From: Simon Garner [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 22, 2001 10:32 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Counter Help From: "Chris Lee" [EMAIL PROTECTED] change $row[count] to $row['count'] it thinks the work [count] is some kind of conastant, it doesnt know you mean (string) 'count' rant I have noticed a lot of people do not put quotes on their array indexes (e.g. VBulletin is a prime offender) - imho this is a really bad practice because your code becomes ambiguous. Example: ?php define("foo", "donkey"); $test = array("foo"="orange", "bar"="purple"); echo $test[foo]; ? Now, I think that should print nothing (or an error), because there is no index matching "donkey" (the value of the constant "foo"). But for some reason PHP looks for an array index matching the string "foo" as well, encouraging this kind of sloppy programming. Regards Simon Garner -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Microsoft's new naming convention...
FYI folks... Microsoft is planning on a new naming convention for it's latest products. They will be naming their Office 10 Suite as Office XP, and Whisler will officially be named Windows XP. They say the "XP" might stand for XML Protocol, which "also happens to be the Worldwide Web Consortium's name for the Simple Object Access Protocol (SOAP) for messaging that Microsoft and a handful of partners are championing." The formal public announcement is expected next week, from Microsoft. I hope Linux and BSD can break the market barrier that Microsoft has a hold of. I'm not a big fan of MS products, but it's good to keep up with your enemy's moves before it makes them. For those who are MS puppets, please don't be offended by my personal tastes...:) Article: Microsoft to rebrand Office, Windows with 'XP'? Source: ZDNet News Author: Mary Jo Foley -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Microsoft's new naming convention...
Wow, i just read the news that they were planning on XP versions. Maybe that's just for the Desktop/NT Windows, rather than all 3 as Cement. I guess we'll find out next week. Thanks for the update... :) -Original Message- From: David VanHorn [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 03, 2001 10:25 AM To: [EMAIL PROTECTED]; PHP (E-mail) Subject: Re: [PHP] Microsoft's new naming convention... At 05:03 AM 2/3/01 -0600, Ahmad Navid Yar wrote: FYI folks... Microsoft is planning on a new naming convention for it's latest products. The next OS version is supposed to combine features from ME, CE, and NT, into windows CEMENT. :) -- Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Microsoft's new naming convention...
LOL, I should have caught that. Check this article out... MSFT 60 13/16 -1 9/16 (2.51%) by Matthew Rothenberg, ZDNet News Is Microsoft's "XP" designation a castle made of sand? Will X mark the spot in this year's platform wars? According to my colleague Mary Jo Foley, Linux and Apple Computer Inc.'s Mac OS X may soon have some X-rated company, thanks to Microsoft Corp.'s assimilationist marketing department. Microsoft may not be ready to get jiggy with open-source programming or other excesses of its smaller OS competitors, but the company is apparently prepared to embrace the platform minorities' fondness for the least-used consonant in the alphabet: According to Foley, the next version of Microsoft Office for Windows will bear the moniker "Office XP" instead of "Office 10," and the Whistler Windows 2000 successor will be dubbed "Windows XP." Is the switch from 10 to X the result of residual DNA from Microsoft co-founder Paul Allen, whose worship of "Are You Experienced?" author Jimi Hendrix is as legendary as his fecklessness as a venture capitalist? Does it reflect Microsoft's own aspirations to rival the Roman Empire in its scope of influence? Is it a tacit acknowledgement that, whatever its triumphs, Windows will always be "Brand X" to a significant segment of the PC-wielding world? ZDNet News' TalkBack correspondents were quick to pipe up with their own (X) ratings of Redmond's move. Businessmen, they drink my wine Mac partisans were quick to note the coincidence of Microsoft's change of iconography and the arrival of Mac OS X, the next-generation Apple successor to Mac OS 9 that many of us have wilfully mispronounced for more than two years now. "Another Mac OS X rip-off by Microsoft," complained engineer "R.M." Not only is Microsoft trying to rip off the look of Aqua [Mac OS X's GUI] for Whistler; now they are going to start using the Roman numeral X for 10 in product names just like Apple. Wow! How original. Doesn't anybody at MS have a single idea of their own?" "It's pathetic how MS jumps on any bandwagon it can," agreed Robert Downs. "This X-naming thing takes the cake. What's next, iWindowsXP?" Hendrix aficionados were equally piqued by Microsoft's apparent effort to evoke the fallen guitar god. "'Not necessarily stoned, but beautiful,' " quoted Andy Citron, a Raleigh, N.C., computer programmer. "That's a line from the 'Are You Experienced' song. I can see folks having a field day with that." "May I suggest the Hendrix song 'Manic Depression' instead of 'Are You Experienced' for the next Windows launch?" added Glenn Parizot, an engineer who said he hails from the "third stone from the sun." Other readers--uninfluenced by the cultural legacy of Cupertino or Seattle--struck out in new directions when offering bon mots about Microsoft's plan. "Citrix is already using 'XP' as its moniker for its upcoming product formerly known as Metaframe 2.0," Denver systems engineer Armando Skeen pointed out. "Talk about confusion! I can see the questions now: 'Is Office XP specifically designed for Metaframe XP?' " Meanwhile, Randy Pugh, a Houston graphic designer, got down to brass tacks. "I'm confused," he confessed. "Maybe they should just name it Windows WTF or Office WTF." Got some naming suggestions of your own for Microsoft? Add them to TalkBack's cross-town traffic below! -Original Message- From: David VanHorn [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 03, 2001 11:03 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] Microsoft's new naming convention... At 10:54 AM 2/3/01 -0600, you wrote: Wow, i just read the news that they were planning on XP versions. Maybe that's just for the Desktop/NT Windows, rather than all 3 as Cement. I guess we'll find out next week. Thanks for the update... :) It's a joke... CEMENT? Dumb as a brick..? -- Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP hosting - the final frontier.
Actually, there is nothing wrong with a one-manned hosting service. I agree with Robert in this, there are a lot of big hosting companies that don't really have a personal hold of their business to really care about their clients. To them everything is automated and all they do is hire customer service people who are only taught to, well, "serve customers" with answers to questions they don't know in the first place. They just read from the script and have basic step-by-step trouble shooting instructions in front of them to solve a client's problems/requests. If you need an updated software package, like PHP4, froman old PHP3 engine, you'de have to beg for it and you might have to go through several layers of support just for that request to go through. Let me remind you that the software is free of charge. If the request is accepted, then more power to you. If it's not then you'll have to deal with it until you decide to find another host. I have one question for you Robert. XML has been in the market for a long time (since 1998), and the recommendations are now set to a true standard. Why do most hosting services not have support for XML based languages yet? Thanks... Navid Yar -Original Message- From: Robert Covell [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 03, 2001 2:40 PM To: Boaz Yahav; Ben Peter; Chris Mason Cc: Php-General Subject: RE: [PHP] PHP hosting - the final frontier. I shouldn't even reply to this... Yes I would host with me. Have you ever heard of a backup plan. People that would step in if something happens to me? People that I trust to keep the company going if it fails. With all due respect, how do people host with a company that doesn't give a rats ass about them or their business. How many big companies redirect your call, or brush you away when problems occur. I been over backwards for my clients. Providing better service then many of the bigger companies out there. That is why people do and will continue to host with me. Like I said, I plan on hiring people in the near future. Things take time to evolve. I am not saying that my company is for everyone. If you don't like a one man shop then don't go there. People have taken a chance with me and have not been disappointed like so many times before. Sincerely, Robert T. Covell President / Owner Rolet Internet Services, LLC Web: www.rolet.com Email: [EMAIL PROTECTED] Phone: 816.210.7145 Fax: 816.753.1952 -Original Message- From: Boaz Yahav [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 03, 2001 1:38 PM To: 'Robert Covell'; Ben Peter; Chris Mason Cc: Php-General Subject: RE: [PHP] PHP hosting - the final frontier. And if, God forbid, something was to happen to you... 120 People / Companies would be left with a server that no one knows the root password too? With all due respect, how can someone in his right mind host with a one man gang company? For all I know you can be a hosting genius and give the best service around but you are still one man. Would you host with you ? :) Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: Robert Covell [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 03, 2001 9:16 PM To: Ben Peter; Chris Mason Cc: Php-General Subject: RE: [PHP] PHP hosting - the final frontier. I am going to have to disagree on this one. I run a successful (and profitable) hosting company(http://www.rolet.com). My employees total 1 (me, myself and I). The number of clients hosted is roughly 120. I provide a wide variety of services on Linux, FreeBSD, NT, and W2K. Yes it is hard to believe that 1 person can be available 24x7, or not take vacations, but this is what I do and LOVE every second of it. I value customer satisfaction and strive to provide that best Internet services possible. For me this is a career for life, not just a job. So I do believe that 1 person can be available 24x7 and not take vacations. Don't get me wrong, some days it is tough. I would like to have other employees in the future, but don't mind the sacrifices taken to get there. Sincerely, Robert T. Covell President / Owner Rolet Internet Services, LLC Web: www.rolet.com Email: [EMAIL PROTECTED] Phone: 816.210.7145 Fax: 816.753.1952 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ben Peter Sent: Saturday, February 03, 2001 11:59 AM To: Chris Mason Cc: Php-General Subject: Re: [PHP] PHP hosting - the final frontier. Chris, This all sounds good but for one thing: I firmly believe that one man with a root password is not enogh to look after even one client. I have hosted with 3 one-man-companies, and it always came to the point where I couldn't reach someone for a week, or I waited for 3 months, only to be granted connect privileges to the mysql database - no offense meant! I think it's just too much for one man, you cannot be available 24/