<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.0.4" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>PHP Web Hosting, Tomcat, JSP, J2EE, Servlets, Struts - PHP4, PHP5 Programming Blog</title>
	<link>http://php.javaservletwebsitehosting.com</link>
	<description>Fine blog on php web site hosting reviews</description>
	<pubDate>Tue, 10 Jun 2008 06:19:04 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.4</generator>
	<language>en</language>
			<item>
		<title>Web server iis - . cbashop.php: Acts as the home page for</title>
		<link>http://php.javaservletwebsitehosting.com/php/web-server-iis-cbashopphp-acts-as-the-home-page-for/</link>
		<comments>http://php.javaservletwebsitehosting.com/php/web-server-iis-cbashopphp-acts-as-the-home-page-for/#comments</comments>
		<pubDate>Tue, 10 Jun 2008 06:19:04 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>php</category>
		<guid isPermaLink="false">http://php.javaservletwebsitehosting.com/php/web-server-iis-cbashopphp-acts-as-the-home-page-for/</guid>
		<description><![CDATA[. cbashop.php: Acts as the home page for your little store and lists your available products.  . getprod.php: Retrieves detailed information about a single product.  . modcart.php: Adds, deletes, or changes quantities of a product to your shopping cart. Also  empties the shopping cart completely.  . cart.php: Displays the contents of [...]]]></description>
			<content:encoded><![CDATA[<p>. cbashop.php: Acts as the home page for your little store and lists your available products.  . getprod.php: Retrieves detailed information about a single product.  . modcart.php: Adds, deletes, or changes quantities of a product to your shopping cart. Also  empties the shopping cart completely.  . cart.php: Displays the contents of your shopping cart.  . checkout.php: The first step in the checkout process; this is where the customer enters billing  and shipping information.  . checkout2.php: The second step in the checkout process; this is where customers verify the  accuracy of their orders and make any last-minute changes.  . checkout3.php: The final step of the checkout process, where the customer actually sends the  order to you, and receives an order number and confirmation. The information is put into the  database and deleted from the temporary table, a customer number is assigned (if it   s a new  customer), and an order number is assigned, as well. E-mail confirmations are sent to the customer  and to you.  Try It Out Defining the Database and Tables  In this exercise you   ll create a run-once script that creates the database and tables for this chapter   s project.  1. Open your text editor and type the following code:  <?php  //connect to the database - either include a connection variable file or  //type the following lines:  $connect = mysql_connect(   localhost   ,    bp5am   ,    bp5ampass   ) or  die (   Hey loser, check your server connection.   );  //Create the ecommerce database  if (mysql_query(   CREATE DATABASE ecommerce   )) {  echo    Woo hoo! Database created! <br />   ;  } else {  echo    Sorry, try creating the database again.   ;  } mysql_select_db(   ecommerce   );  //Define the product table  $query =    CREATE TABLE products (  products_prodnum CHAR(5) NOT NULL,  products_name VARCHAR(20) NOT NULL,  products_proddesc TEXT NOT NULL,  products_price DEC (6,2) NOT NULL,  products_dateadded DATE NOT NULL,  PRIMARY KEY(products_prodnum))   ;  $product = mysql_query($query)  or die(mysql_error());  //Define the customer table  $query2 =    CREATE TABLE customers (  520  Chapter 15   <br />If you are in need for chaep and reliable webhost to host your website, our recommendation is <a href="http://coldfusion.javaservletwebsitehosting.com">http web server</a> services.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://php.javaservletwebsitehosting.com/php/web-server-iis-cbashopphp-acts-as-the-home-page-for/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>. Superhero suits customizable with color schemes and  (Web design rates)</title>
		<link>http://php.javaservletwebsitehosting.com/php/superhero-suits-customizable-with-color-schemes-and-web-design-rates/</link>
		<comments>http://php.javaservletwebsitehosting.com/php/superhero-suits-customizable-with-color-schemes-and-web-design-rates/#comments</comments>
		<pubDate>Mon, 09 Jun 2008 07:16:43 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>php</category>
		<guid isPermaLink="false">http://php.javaservletwebsitehosting.com/php/superhero-suits-customizable-with-color-schemes-and-web-design-rates/</guid>
		<description><![CDATA[. Superhero suits customizable with color schemes and monogrammed torso letters  . Two different types of grappling hooks for all our superheroes    needs  You will be expanding on these products later and adding them to your product catalog (that is, the  products table in your database).  A Shopping [...]]]></description>
			<content:encoded><![CDATA[<p>. Superhero suits customizable with color schemes and monogrammed torso letters  . Two different types of grappling hooks for all our superheroes    needs  You will be expanding on these products later and adding them to your product catalog (that is, the  products table in your database).  A Shopping Cart  Now that you know what you are going to sell, you have to have some way for your customers to  choose the specific products they want to buy; this involves a shopping cart. You can hook yourself up  with ready-made shopping cart software, or you can use a cart straight from a programming script, such  as PHP (or CGI, or whatever). Because we   re on this topic, we may as well get a little crazy and talk a little  bit about the pros and cons of each.  Shopping Cart Software  Numerous shopping cart software programs are available that can easily hook your customers up and  make it easy for them to pick what they want. Although these programs can be expensive, they can also  take care of things such as security, complex product option selection, maintaining customer information,  and keeping track of previously placed orders.  An example of shopping cart software is Cart32. Available at www.cart32.com, this is a widely used shopping  cart program that provides numerous configuration options for a Webmaster. Features include Webbased  administration of your cart and pending/sent orders, the ability to use your own database or theirs  to store product and customer information, automatic credit card processing and e-mail confirmations,  complex product options and discount structures, online tracking through the major shipping carriers for  your customers to track their orders, inventory management, and customization of the look of your cart.  The costs are $29.95 to set up and $29.95 per month if you have Cart32 host the cart portion of your site for  you. Many Web hosting companies have chosen Cart32 for the cart they offer to their customers.  These types of software programs are popular because they enable you to get your store up and running  with relative ease and because they take care of the security issues for you.  Your Own Cart Software Code  Remember that whenever you depend on someone else to supply a portion of your site, you are at the  mercy of their servers and their software. If they are hosting your shopping cart for you, when their site  is down, so is yours. If their servers catch a virus, it affects you and your customers, too. Plus, there may  be a function you need that they don   t offer, or the cost may be prohibitive for your newly created site.  Whatever the reason, you may want to code your own script, and if you are brave enough to tread these  waters, let   s go!  You   ll start with a very simple shopping cart system that will consist of several files:  . create.php: Creates the main database and the necessary tables.  . createtemp.php: Creates a temporary table to store shopping cart information before the customer  actually checks out.  . products.php: Populates the database with product information.  519  Online Stores   <br />From our experience, we are can tell you that you can find a reliable and cheap webhost service at <a href="http://www.javaservletwebsitehosting.com">Java Web Hosting</a> services.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://php.javaservletwebsitehosting.com/php/superhero-suits-customizable-with-color-schemes-and-web-design-rates/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Abyss web server - Adding E-Commerce to the Comic Book Fan Site</title>
		<link>http://php.javaservletwebsitehosting.com/php/abyss-web-server-adding-e-commerce-to-the-comic-book-fan-site/</link>
		<comments>http://php.javaservletwebsitehosting.com/php/abyss-web-server-adding-e-commerce-to-the-comic-book-fan-site/#comments</comments>
		<pubDate>Sun, 08 Jun 2008 07:18:20 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>php</category>
		<guid isPermaLink="false">http://php.javaservletwebsitehosting.com/php/abyss-web-server-adding-e-commerce-to-the-comic-book-fan-site/</guid>
		<description><![CDATA[Adding E-Commerce to the Comic Book  Fan Site  It   s time to show you how you can easily incorporate an e-commerce section on your Comic Book  Appreciation fan site. You will need a few things to get started:  . Something to sell  . Some mechanism for your customers [...]]]></description>
			<content:encoded><![CDATA[<p>Adding E-Commerce to the Comic Book  Fan Site  It   s time to show you how you can easily incorporate an e-commerce section on your Comic Book  Appreciation fan site. You will need a few things to get started:  . Something to sell  . Some mechanism for your customers to pick what they want to buy  . Some way for your customers to pay for what they want to buy  . Some process to get the merchandise to your customers  Let   s break it down (break dancing gear optional) and talk about each of these things individually. The  first two we can help you with; the second two are really outside the scope of this book, beyond a general  discussion.  Something to Sell  Before you can sell something, you have to have something to sell. Duh. Next topic. No, seriously, retailers  spend millions researching what will sell and what won   t, what the hottest trends are, and what the  latest technology has to offer. All that being said, your ideas for products will probably come from one or  more of the following categories:  . Your own knowledge: You will most likely know what your customers want based on your  inherent knowledge of the focus of your Web site. For example, if you have a site for collectors  of old tractors, you probably know what products would appeal to your typical customer  because you are the typical customer.  . Something you yourself couldn   t easily find: You also may have been looking for a specific  product or group of products, only to find that they do not exist on one particular site until you  create it and pull them all together. (For example, www.giftsforengineers.com was created  to be a compilation of products that appeal to engineers.)  . Your own inventions: Another item you might sell from your site is a new invention or design  you have created from your little old brain. Many budding artists and inventors sell their stuff  on the Web, where they can reach a multitude of potential buyers.  . Promotion of your site: Many other Web sites offer promotional items for sale that tout the URL  of their site. This acts as a    win-win    for both parties; the customers can proclaim their support  for a cool site and the site makes a few bucks and gets its name out there for all to see.  So whether you   re reinventing the wheel, selling specific types of wheels, taking a bunch of wheels and  putting them together, or selling wheels with your name on them, you must create a product base, and it  may not be as easy as it looks.  For your CBA site, you will be selling items from a few different categories. To spice things up a bit, we  decided it would be great to have some fun with this:  . T-shirts, bumper stickers, and coffee mugs with the CBA logo, from the promotional category  518  Chapter 15   <br />Searching for affordable and reliable webhost to host and run your web applications? Go to our <a href="http://www.premiumwebsitehosting.net">java web server</a> services and you will be pleased.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://php.javaservletwebsitehosting.com/php/abyss-web-server-adding-e-commerce-to-the-comic-book-fan-site/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>15 Online Stores Some of us cringe when  (Web hosting reseller)</title>
		<link>http://php.javaservletwebsitehosting.com/php/15-online-stores-some-of-us-cringe-when-web-hosting-reseller/</link>
		<comments>http://php.javaservletwebsitehosting.com/php/15-online-stores-some-of-us-cringe-when-web-hosting-reseller/#comments</comments>
		<pubDate>Sat, 07 Jun 2008 09:20:50 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>php</category>
		<guid isPermaLink="false">http://php.javaservletwebsitehosting.com/php/15-online-stores-some-of-us-cringe-when-web-hosting-reseller/</guid>
		<description><![CDATA[15  Online Stores  Some of us cringe when we hear the word    e-commerce    and the phrase    selling over the Internet.     Perhaps we   ve had a bad experience ourselves, or the thought of opening an online store is just [...]]]></description>
			<content:encoded><![CDATA[<p>15  Online Stores  Some of us cringe when we hear the word    e-commerce    and the phrase    selling over the Internet.     Perhaps we   ve had a bad experience ourselves, or the thought of opening an online store is just too  overwhelming. Even though this is the part of the book that all geeks out there probably dread  reading, we   re here to show you that e-commerce is really not so bad, and that pretty much anyone  can do it.  However, just because anyone can do it doesn   t mean it   s always done the right way. Done the  wrong way, your site can look downright cheesy, but done the right way, your site can look professional  and inviting, and become an excellent resource for your visitors and potential customers.  There are definite, if unwritten, guidelines for selling things over the Web and we want to make  sure you do things the right way.  Selling things from your Web site can not only make you some extra cash; it can enhance your  relationship with your Web site visitors (if e-commerce is not your site   s primary function). In the  case of your comic book fan site, offering pertinent items can make your site more interactive and  interesting and bring visitors back again to see what new items you have for sale. True comic book  fans will appreciate the niche of items you are providing, especially if some of the items are unique  or hard to come by.  This chapter discusses the following:  . Creating a simple shopping cart script  . Other ideas to improve your script  . E-commerce basics   <br />We recommend cheap and reliable webhost to host and run your web applications: <a href="http://j2ee.javaservletwebsitehosting.com">Coldfusion Web Hosting</a> services.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://php.javaservletwebsitehosting.com/php/15-online-stores-some-of-us-cringe-when-web-hosting-reseller/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Cheapest web hosting - Mailing List Ethics You should know about a</title>
		<link>http://php.javaservletwebsitehosting.com/php/cheapest-web-hosting-mailing-list-ethics-you-should-know-about-a/</link>
		<comments>http://php.javaservletwebsitehosting.com/php/cheapest-web-hosting-mailing-list-ethics-you-should-know-about-a/#comments</comments>
		<pubDate>Thu, 05 Jun 2008 09:19:43 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>php</category>
		<guid isPermaLink="false">http://php.javaservletwebsitehosting.com/php/cheapest-web-hosting-mailing-list-ethics-you-should-know-about-a/</guid>
		<description><![CDATA[Mailing List Ethics  You should know about a couple of ethical issues when dealing with the world of mailing lists, namely  spam and opt-in/opt-out. This section represents our personal soap box for airing our opinions about  them.  A Word About Spam  With the advent of the computer, mailing lists have [...]]]></description>
			<content:encoded><![CDATA[<p>Mailing List Ethics  You should know about a couple of ethical issues when dealing with the world of mailing lists, namely  spam and opt-in/opt-out. This section represents our personal soap box for airing our opinions about  them.  A Word About Spam  With the advent of the computer, mailing lists have been brought to a whole new level. Now you can be  (and no doubt are) told on a daily basis that Candy really wants you to visit her Web site, and that a little  blue pill will solve all of your personal problems. Yes, occasionally an e-mail sits in your Inbox informing  you of new job postings, new posts on PHPBuilder.com, or tour dates for Jimmy Buffett. But we think you  know what mailing lists are primarily used for: spam!  For those of you just crawling out of a suspended animation chamber, spam is a term used to describe a     shotgun    approach to advertising. You simply send your e-mail advertisement to as many people as  you possibly can, in the hopes that a certain small percentage of them will actually respond.  What is our point? SPAM is a luncheon meat. You spell it in all capital letters, and you enjoy it on your  sandwiches. Spam is another name for UCE, or unsolicited commercial e-mail. It is spelled in all lowercase,  and we shun it.  The bottom line: Don   t use mailing lists to send spam. Your mother would be very disappointed.  Opt-In versus Opt-Out  You may have heard these terms before. What do they mean? To most of your users, probably not much.  They simply answer the questions on your registration, read the fine print (as all users do, of course),  and click the Submit button.  However, you aren   t a user any more. At least, not on your own site. You are the administrator. You need  to understand the difference between opt-in and opt-out because it may mean the difference between  annoyance and acceptance for your users.  Opt-in and opt-out are fancy ways of saying    What is the default choice for your users?    Opt-in means  the user is not currently scheduled to receive a specific newsletter, but he or she may opt to subscribe.  Obviously, opt-out is the opposite   your user will automatically receive notifications unless he or she  opts to remove him- or herself from that mailing list.  Why the difference? As the administrator, you may sometimes have to walk a fine line between satisfying  your advertisers (the ones giving you money to keep your site alive) and your users (the ones visiting  your site, keeping your advertisers happy by driving up the number of hits). If an advertiser pays you  enough, you might agree to automatically send advertisements from that company unless the user explicitly  chooses not to receive them (opt-out).  However, you might have a newsletter you send once per week that contains, for example, details of  comic conventions throughout the country (or even the world). Not all visitors to your site will be interested  in that, but if any are, they can subscribe to the newsletter so they will always be notified (opt-in).  514  Chapter 14   <br />If you are searching for cheap webhost for your web application, please visit <a href="http://mysql5.a1websitehosting.net">MySQL5 Web Hosting</a> services.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://php.javaservletwebsitehosting.com/php/cheapest-web-hosting-mailing-list-ethics-you-should-know-about-a/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Web hosting domains - However, the user.php form forces you to take</title>
		<link>http://php.javaservletwebsitehosting.com/php/web-hosting-domains-however-the-userphp-form-forces-you-to-take/</link>
		<comments>http://php.javaservletwebsitehosting.com/php/web-hosting-domains-however-the-userphp-form-forces-you-to-take/#comments</comments>
		<pubDate>Wed, 04 Jun 2008 12:21:38 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>php</category>
		<guid isPermaLink="false">http://php.javaservletwebsitehosting.com/php/web-hosting-domains-however-the-userphp-form-forces-you-to-take/</guid>
		<description><![CDATA[However, the user.php form forces you to take one extra step. You get the mailing list ID from the  mailing list choice, but you have only an e-mail address for the user. Therefore, you will need to do a  lookup with that e-mail address. As you   ll no doubt recall, the [...]]]></description>
			<content:encoded><![CDATA[<p>However, the user.php form forces you to take one extra step. You get the mailing list ID from the  mailing list choice, but you have only an e-mail address for the user. Therefore, you will need to do a  lookup with that e-mail address. As you   ll no doubt recall, the Remove button on user.php loads the  user_transact.php page, and when the    action    is Remove, you do a lookup for user_id based on  the e-mail address, and build the URL for remove.php. You then redirect the user to remove.php with  the correct parameters. Time for remove.php to do its job!  You can   t just assume that remove.php received the appropriate variables. You test to ensure they are  set and run the DELETE query.  if (isset($_GET[   u   ], $_GET[   ml   ])) {  $sql =    DELETE FROM ml_subscriptions     .     WHERE user_id=    . $_GET[   u   ] .      AND ml_id=    . $_GET[   ml   ];  $result = mysql_query($sql, $conn);  } else {  die(   Incorrect parameters passed for deletion   );  }  That was easy, but you still need to do a couple of things, like build the page. Don   t quit on us now. Of  course, first, you must make sure the deletion worked. Announce the results in big letters!  if ($result) {  $msg =<br />
<h2>Removal Successful</h2>
<p>   ;  } else {  $msg =<br />
<h2>Removal Failed</h2>
<p>   ;  }  Using the mailing list id, you do a lookup for the name of the mailing list and build the page   s message:  $ml_id = $_GET[   ml   ];  $sql =    SELECT * FROM ml_lists WHERE ml_id =        . $ml_id .          ;  $result = mysql_query($sql)  or die(   Invalid query:     . mysql_error());  if (mysql_num_rows($result)) {  $row = mysql_fetch_array($result);  $msg .=    You have been removed from the <i>    .  $row[   listname   ] .    </i> mailing list.<br />   ;  } else {  $msg .=    Sorry, could not find Mailing List id#{$ml_id}   ;  }  Finally, you add a link back to user.php at the bottom of the page and echo it to the screen.  $msg .=    <a href=   user.php?u=    . $_GET[   u   ] .        >Return to Mailing List Signup page</a>   ;  echo $msg;  513  Mailing Lists   <br />Please visit <a href="http://domain.a1websitehosting.net">Domain Name Hosting</a> services for high quality webhost to host and run your jsp applications.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://php.javaservletwebsitehosting.com/php/web-hosting-domains-however-the-userphp-form-forces-you-to-take/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Web design company - $result = mysql_query($sql) or die(   Invalid query:     .</title>
		<link>http://php.javaservletwebsitehosting.com/php/web-design-company-result-mysql_querysql-or-die-invalid-query/</link>
		<comments>http://php.javaservletwebsitehosting.com/php/web-design-company-result-mysql_querysql-or-die-invalid-query/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 14:09:55 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>php</category>
		<guid isPermaLink="false">http://php.javaservletwebsitehosting.com/php/web-design-company-result-mysql_querysql-or-die-invalid-query/</guid>
		<description><![CDATA[$result = mysql_query($sql)  or die(   Invalid query:     . mysql_error());  if (mysql_num_rows($result)) {  $row = mysql_fetch_array($result);  $msg .=    You have been removed from the     .  $row[   listname   ] .     mailing [...]]]></description>
			<content:encoded><![CDATA[<p>$result = mysql_query($sql)  or die(   Invalid query:     . mysql_error());  if (mysql_num_rows($result)) {  $row = mysql_fetch_array($result);  $msg .=    You have been removed from the <i>    .  $row[   listname   ] .    </i> mailing list.<br />   ;  } else {  $msg .=    Sorry, could not find Mailing List id#{$ml_id}   ;  } $msg .=    <a href=   user.php?u=    . $_GET[   u   ] .        >Return to Mailing List Signup page</a>   ;  echo $msg;  ?>  2. At the bottom of the e-mail you sent yourself is a link you can click to remove yourself from the  mailing list.  Now, click the link. You should see the Removal page (see Figure 14-5), with a message of success.  If you send another message to that mailing list, the message should not be sent to your  e-mail address.  Figure 14-5  How It Works  Auser can remove him- or herself from a mailing list in two ways. The first way is for the user to go to  user.php, enter the e-mail address, choose the mailing list, and click the Remove button. The second way  is via a link that you conveniently include at the end of e-mails that are sent to the mailing list recipients.  The remove.php page requires two parameters, user ID and mailing list ID. You are removing a database  record from the ml_subscriptions table, and you will recall that those two values are what make each  record unique. You can easily get that data from the e-mail link; it   s embedded as part of the URL.  512  Chapter 14   <br />From our experience, we are can tell you that you can find a reliable and cheap webhost service at <a href="http://www.javaservletwebsitehosting.com">Java Web Hosting</a> services.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://php.javaservletwebsitehosting.com/php/web-design-company-result-mysql_querysql-or-die-invalid-query/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Web design portfolio - Then comes the custom part of the message.</title>
		<link>http://php.javaservletwebsitehosting.com/php/web-design-portfolio-then-comes-the-custom-part-of-the-message/</link>
		<comments>http://php.javaservletwebsitehosting.com/php/web-design-portfolio-then-comes-the-custom-part-of-the-message/#comments</comments>
		<pubDate>Mon, 02 Jun 2008 15:12:02 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>php</category>
		<guid isPermaLink="false">http://php.javaservletwebsitehosting.com/php/web-design-portfolio-then-comes-the-custom-part-of-the-message/</guid>
		<description><![CDATA[Then comes the custom part of the message. Currently, there are two types of Thank You messages:     A confirmation request has been sent to . . .   , and    A subscription notification has been sent . . .     switch ($_GET[   [...]]]></description>
			<content:encoded><![CDATA[<p>Then comes the custom part of the message. Currently, there are two types of Thank You messages:     A confirmation request has been sent to . . .   , and    A subscription notification has been sent . . .     switch ($_GET[   t   ]) {  case    c   :  $msg .=    A confirmation request has been sent     .     to <b>$email</b>.</p>
<p>   ;  break;  case    s   :  $msg .=    A subscription notification has been     .     sent to you at <b>$email</b>.</p>
<p>   ;  }  Finally, you finish the page by putting a link back to user.php, and displaying the page.  $msg .=    <a href=   user.php?u=$uid   >    .     Return to Mailing List Signup page</a>   ;  echo $msg;  Try It Out Removing Your Subscription  Now that you   ve given users the ability to add themselves to your mailing lists, you need to give them  the ability to remove themselves when they want.  1. The e-mail that you sent yourself has a link on it allowing your users to remove themselves  from the mailing list, if they desire. Enter that file now, and save it as remove.php:  <?php  require(   config.php   );  $conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS)  or die(   Could not connect to MySQL database.     . mysql_error());  mysql_select_db(SQL_DB, $conn);  if (isset($_GET[   u   ], $_GET[   ml   ])) {  $sql =    DELETE FROM ml_subscriptions     .     WHERE user_id=    . $_GET[   u   ] .      AND ml_id=    . $_GET[   ml   ];  $result = mysql_query($sql, $conn);  } else {  die(   Incorrect parameters passed for deletion   );  } if ($result) {  $msg =<br />
<h2>Removal Successful</h2>
<p>   ;  } else {  $msg =<br />
<h2>Removal Failed</h2>
<p>   ;  } $ml_id = $_GET[   ml   ];  $sql =    SELECT * FROM ml_lists WHERE ml_id =        . $ml_id .          ;  511  Mailing Lists   <br />Visit our <a href="http://coldfusion.premiumwebsitehosting.net">web design programs</a> services for an affordable and reliable webhost to suit all your needs.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://php.javaservletwebsitehosting.com/php/web-design-portfolio-then-comes-the-custom-part-of-the-message/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Connect to the  (Web design careers) database: $conn = mysql_connect(SQL_HOST, SQL_USER,</title>
		<link>http://php.javaservletwebsitehosting.com/php/connect-to-the-web-design-careers-database-conn-mysql_connectsql_host-sql_user/</link>
		<comments>http://php.javaservletwebsitehosting.com/php/connect-to-the-web-design-careers-database-conn-mysql_connectsql_host-sql_user/#comments</comments>
		<pubDate>Sun, 01 Jun 2008 19:06:40 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>php</category>
		<guid isPermaLink="false">http://php.javaservletwebsitehosting.com/php/connect-to-the-web-design-careers-database-conn-mysql_connectsql_host-sql_user/</guid>
		<description><![CDATA[Connect to the database:  $conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS)  or die(   Could not connect to MySQL database.     . mysql_error());  mysql_select_db(SQL_DB, $conn);  Get user info based on the user id. If you find it, display the title    Thank You,    followed [...]]]></description>
			<content:encoded><![CDATA[<p>Connect to the database:  $conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS)  or die(   Could not connect to MySQL database.     . mysql_error());  mysql_select_db(SQL_DB, $conn);  Get user info based on the user id. If you find it, display the title    Thank You,    followed by the user   s  first name. Also grab the user   s e-mail address. You   ll use it later.  if (isset($_GET[   u   ])) {  $uid = $_GET[   u   ];  $sql =    SELECT * FROM ml_users WHERE user_id =    $uid      ;  $result = mysql_query($sql)  or die(   Invalid query:     . mysql_error());  if (mysql_num_rows($result)) {  $row = mysql_fetch_array($result);  $msg =<br />
<h2>Thank You,     . $row[   firstname   ] .    </h2>
<p>   ;  $email = $row[   email   ];  } else {  die(   No match for user id     . $uid);  }  }  Next, you get the listname, based on the mailing list id. If you find it, you build the message to include     Thanks for subscribing.    Once you get past this point, you know you have the user ID and mailing  list ID.  if (isset($_GET[   ml   ])) {  $ml_id = $_GET[   ml   ];  $sql =    SELECT * FROM ml_lists WHERE ml_id =        . $ml_id .          ;  $result = mysql_query($sql)  or die(   Invalid query:     . mysql_error());  if (mysql_num_rows($result)) {  $row = mysql_fetch_array($result);  $msg .=    Thank you for subscribing to the <i>    .  $row[   listname   ] .    </i> mailing list.<br />   ;  } else {  die (   Could not find Mailing List $ml_id   );  }  } else {  die (   Mailing List id missing.   );  }  Now all you have to do is determine the type of message you   re displaying.  if (!isset($_GET[   t   ])) {  die(   Missing Type   );  }  It is crucial that the type be set. If not, stop processing this page. You don   t know what to thank the user for.  510  Chapter 14   <br />From our experience, we can recommend <a href="http://php.javaservletwebsitehosting.com">PHP Web Hosting</a> services, if you need affordable webhost to host and run your web application.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://php.javaservletwebsitehosting.com/php/connect-to-the-web-design-careers-database-conn-mysql_connectsql_host-sql_user/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>1 on 1 web hosting - Now you need to retrieve the user   s e-mail</title>
		<link>http://php.javaservletwebsitehosting.com/php/1-on-1-web-hosting-now-you-need-to-retrieve-the-user-s-e-mail/</link>
		<comments>http://php.javaservletwebsitehosting.com/php/1-on-1-web-hosting-now-you-need-to-retrieve-the-user-s-e-mail/#comments</comments>
		<pubDate>Sat, 31 May 2008 22:11:52 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>php</category>
		<guid isPermaLink="false">http://php.javaservletwebsitehosting.com/php/1-on-1-web-hosting-now-you-need-to-retrieve-the-user-s-e-mail/</guid>
		<description><![CDATA[Now you need to retrieve the user   s e-mail address based on his or her user id, so you can send him or  her an e-mail. This should also look familiar:  $sql =    SELECT * FROM ml_users     .     WHERE user_id= [...]]]></description>
			<content:encoded><![CDATA[<p>Now you need to retrieve the user   s e-mail address based on his or her user id, so you can send him or  her an e-mail. This should also look familiar:  $sql =    SELECT * FROM ml_users     .     WHERE user_id=       . $_GET[   u   ] .       ;   ;  $result = mysql_query($sql, $conn);  $row = mysql_fetch_array($result);  $firstname = $row[   firstname   ];  $email = $row[   email   ];  The body of this message is a little different. You are building the subject and body parameters for the  mail() function and sending the mail to your user. Now you just need to send it on its way.  $url =    http://    . $_SERVER[   HTTP_HOST   ] .  dirname($_SERVER[   PHP_SELF   ]) .     /remove.php?u=    . $_GET[   u   ] .     &#038;ml=    . $_GET[   ml   ];  $subject =    Mailing List Subscription Confirmed   ;  $body =    Hello     . $firstname .    ,n    .     Thank you for subscribing to the     .  $listname .     mailing list. Welcome!nn    .     If you did not subscribe, please accept our     .     apologies.n   .     You can remove this subscription immediately by    .     visiting the following URL:n    . $url;  $mailmsg = new SimpleMail();  $mailmsg->send($email,$subject,$body,$headers);  Off your user goes, to the Thank You page:  $redirect =    thanks.php?u=    . $_GET[   u   ] .    &#038;ml=    .  $_GET[   ml   ] .    &#038;t=s   ;  Finally, if    action    somehow is set to something other than Remove, Subscribe, or confirm, you will  need to redirect the user somewhere else   in this case, user.php. The final line handles the redirection:  default:  $redirect =    user.php   ;  }  } header(   Location:     . $redirect);  The user_transact.php page is not terribly complicated. However, when you have a single page performing  multiple tasks, you need to be careful that all situations are handled correctly.  thanks.php  Next let   s look at the code in thanks.php. Most of it is familiar code that you have used elsewhere. You  should have no problem breezing through this one.  509  Mailing Lists   <br />Note: If you are looking for cheap and reliable webhost to host and run your mysql application check <a href="http://mysql.a1websitehosting.net">mysql web server</a> services.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://php.javaservletwebsitehosting.com/php/1-on-1-web-hosting-now-you-need-to-retrieve-the-user-s-e-mail/feed/</wfw:commentRSS>
		</item>
	</channel>
</rss>
