Showing posts with label php variables example. Show all posts
Showing posts with label php variables example. Show all posts

How to use urlencode function in php

How to use urlencode function in php


UrlEncodeFunction.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>How to use urlencode function in php</title>
</head>

<body>
    <h2 style="color:SeaGreen; font-style:italic">php function example: How to use urlencode function</h2>
    <hr width="550" align="left" color="DarkSeaGreen" />
    <br />
 
    <?php 
  $SoftwareName=urlencode("Adobe Coldfusion");
  echo "<a href='SoftwareDetails.php?SoftwareID=1&Software=$SoftwareName'>";
  echo "<font style='font-size:xx-large;'>Visit Software Details</font>";
  echo "</a>";
  ?>
</body>
</html>


SoftwareDetails.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>How to use urlencode function in php</title>
</head>

<body>
    <h2 style="color:SeaGreen; font-style:italic">php function example: How to use urlencode function</h2>
    <hr width="550" align="left" color="DarkSeaGreen" />
    <br />
 
    <?php 
  $SoftwareName=urlencode("Adobe Coldfusion");
  echo "<a href='SoftwareDetails.php?SoftwareID=1&Software=$SoftwareName'>";
  echo "<font style='font-size:xx-large;'>Visit Software Details</font>";
  echo "</a>";
  ?>
</body>
</html>






How to use url variables in php

How to use url variables in php


URLVariables.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>How to use url variables in php</title>
</head>

<body>
    <h2 style="color:OrangeRed; font-style:italic">php URL variables example: How to use url variables</h2>
    <hr width="550" align="left" color="LightPink" />
    <br />

 <a href="ProdutcsDetails.php?ProductID=1&ProductName=ColdFusion">
     <font style="font-size:x-large;">Product Details</font>
    </a>
</body>
</html>


ProdutcsDetails.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>How to read url variables in php</title>
</head>

<body>
    <h2 style="color:SeaGreen; font-style:italic">php URL variables example: How to read url variables</h2>
    <hr width="550" align="left" color="DarkSeaGreen" />
    <br />

 <table style="background-color:Crimson; color:Snow; width:450px;" cellspacing="1">
     <tr style="background-color:HotPink; font-size:large; height:35px;">
         <td colspan="2">
             Reading the URL variables
            </td>
        </tr>
     <tr style="background-color:DarkOrange; font-weight:bold;">
         <td>Product ID</td>
         <td>Product Name</td>
        </tr>
     <tr style="background-color:Orange;">
         <td>
    <?php echo $_REQUEST['ProductID']; ?>
            </td>
         <td>
    <?php echo $_REQUEST['ProductName']; ?>
            </td>
        </tr>
    </table>
</body>
</html>