<?xml version="1.0" encoding="UTF-8"?>
<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/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>phpPig &#187; Scripts</title>
	<atom:link href="http://phppig.org/category/scripts/feed/" rel="self" type="application/rss+xml" />
	<link>http://phppig.org</link>
	<description>PHP scripts and code to help newbies</description>
	<lastBuildDate>Mon, 25 Jul 2011 07:50:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Using In-Browser FTP to manage files on server</title>
		<link>http://phppig.org/220/using-in-browser-ftp-to-manage-files-on-server/</link>
		<comments>http://phppig.org/220/using-in-browser-ftp-to-manage-files-on-server/#comments</comments>
		<pubDate>Mon, 25 Jul 2011 07:50:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://phppig.org/?p=220</guid>
		<description><![CDATA[<p>For the past few months, I have been looking at options to give me an in-browser method of editing/uploading files on my server because I am having to cut costs and get rid of my ISP (namely, HughesNet). Where I live it, we are in an extremely rural area and haven&#8217;t been able to get highspeed <span style="color:#777"> . . . &#8594; Read More: <a href="http://phppig.org/220/using-in-browser-ftp-to-manage-files-on-server/">Using In-Browser FTP to manage files on server</a></span>]]></description>
			<content:encoded><![CDATA[<p>For the past few months, I have been looking at options to give me an in-browser method of editing/uploading files on my server because I am having to cut costs and get rid of my ISP (namely, HughesNet). Where I live it, we are in an extremely rural area and haven&#8217;t been able to get highspeed access to the internet without using one of the satellite service providers. Due to the limitations on the service, I have been really been bound to what I could or couldn&#8217;t do online.</p>
<p>Two months ago, AT&#038;T Wireless upgraded our cellphone towers to 3G. Having an iPhone and having downloaded HandyLight in the few hours it was available through the iTunes store, I have been looking for a method of being able to FTP in files and folders to my server through the data connection established with my iPhone (I do have the unlimited data plan on my iPhone and needed a method to utilize this in the fullest capabilities.)</p>
<p>I have tried and tried to find a way to make it work and was just about to throw in the towel when I came across a site that had the exact solution to my problem. <a href="http://www.gerd-tentler.de/tools/filemanager/" target="_blank">FileManager</a> was the answer to my problems. Installing it on my server and integrating it into my homepage was rather simple. All I have to do now is visit my homepage with the data connection from my iPhone and the index page initializes my FTP session in the browser. And using a zip and unzip php script, it takes a lot less time to upload a new folder to the server because I can upload the zip file the decompress on the server.</p>
<p>I can now say goodbye to HughesNet and their high priced/low quality service and hello to a much more efficient and cost effective method of conducting my business online.</p>
<p>For those of you who have HandyLight and have been looking for a way to FTP in and out of a server with it, try this out. I have the homepage protected using .htaccess/.htpasswd to keep others out.</p>
<p>This would also work great if you need to edit or upload files from a public computer or other device. It is a perfect method for you to work on your websites from work, too! ;D</p>
]]></content:encoded>
			<wfw:commentRss>http://phppig.org/220/using-in-browser-ftp-to-manage-files-on-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating basic admin section (part 2 of building full php script)</title>
		<link>http://phppig.org/203/creating-basic-admin-section-part-2-of-building-full-php-script/</link>
		<comments>http://phppig.org/203/creating-basic-admin-section-part-2-of-building-full-php-script/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 23:53:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://phppig.org/?p=203</guid>
		<description><![CDATA[<p>In the first article, we created the entire install script while creating a database and writing the config and .htaccess files for the site. (Files will be written when install script is run.)</p>
<p>We now need to have a way to add posts, pages, and items to our database, as well as edit our site&#8217;s details and <span style="color:#777"> . . . &#8594; Read More: <a href="http://phppig.org/203/creating-basic-admin-section-part-2-of-building-full-php-script/">Creating basic admin section (part 2 of building full php script)</a></span>]]></description>
			<content:encoded><![CDATA[<p>In the first article, we created the entire install script while creating a database and writing the config and .htaccess files for the site. (Files will be written when install script is run.)</p>
<p>We now need to have a way to add posts, pages, and items to our database, as well as edit our site&#8217;s details and to add our homepage and paypal address information.</p>
<p>Before we get started, you will need to download the <a href="http://tinymce.moxiecode.com/download.php">TinyMCE</a> open source editor to make adding pages a snap without having to know a bit of html. The first file that we are going write is our index.php file. Go ahead and save the file to Script->admin->index.php.<br />
<code><br />
&lt;?php<br />
 session_start();<br />
 ob_start();<br />
 define( 'ADMIN_ACCESS', 1 );<br />
 $inscript = true;<br />
 include_once('../inc/config.php');<br />
 include_once('../inc/functions.php');<br />
 include_once('./admin-titles.php');<br />
 //login checker<br />
 include_once('./admin-login.php');<br />
 $sql = mysql_query("SELECT `reported` FROM `".$SQL_Ext."_media` WHERE `reported` = '1'");<br />
 $reported = @mysql_num_rows($sql);<br />
 $sql = mysql_query("SELECT `published` FROM `".$SQL_Ext."_media` WHERE `published` = '0'");<br />
 $pending = @mysql_num_rows($sql);<br />
 $idblah = $_GET['id'];<br />
 $pos = strpos($idblah, "UNION SELECT");<br />
 if ($pos === false) {}<br />
 else { echo 'error'; }<br />
 $idblah = $_GET['action'];<br />
 $pos = strpos($idblah, "UNION SELECT");<br />
 if ($pos === false) {}<br />
 else { echo 'error'; }<br />
 $action = makesafe($_GET['action']);<br />
 $id     = intval($_GET['id']);<br />
?&gt;<br />
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;<br />
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;&lt;?php admin_title($action)?&gt;&lt;/title&gt;<br />
&lt;? include('./images/style.css'); ?&gt;<br />
&lt;script&gt;<br />
 function selectText(){<br />
 document.sitemap.sitemap.focus();<br />
 document.sitemap.sitemap.select();<br />
 }<br />
 &lt;/script&gt;<br />
&lt;script language="javascript" type="text/javascript" src="&lt;?php echo $site_url; ?&gt;/admin/tinymce/jscripts/tiny_mce/tiny_mce.js"&gt;&lt;/script&gt;<br />
&lt;script language="javascript" type="text/javascript"&gt;<br />
tinyMCE.init({<br />
	mode : "textareas",<br />
	theme : "advanced",<br />
	plugins : "table,save,autosave,autosave,cleanup,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print,contextmenu,directionality,inlinepopups,media,nonbreaking,visualchars,devkit,paste,noneditable,layer,halfpage,fullscreen,",<br />
	theme_advanced_buttons1_add_before : "save,separator,",<br />
	theme_advanced_buttons1_add : "fontselect,fontsizeselect",<br />
	theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor",<br />
	theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator",<br />
	theme_advanced_buttons3_add_before : "tablecontrols,separator",<br />
	theme_advanced_buttons3_add : "emotions,iespell,flash,advhr,separator,print,ltr,rtl",<br />
	theme_advanced_buttons4_add_before : "visualchars,nonbreaking,devkit,separator,layer,fullpage,fullscreen",<br />
	table_styles : "Header 1=header1;Header 2=header2;Header 3=header3",<br />
	table_cell_styles : "Header 1=header1;Header 2=header2;Header 3=header3;Table Cell=tableCel1",<br />
	table_row_styles : "Header 1=header1;Header 2=header2;Header 3=header3;Table Row=tableRow1",<br />
	table_cell_limit : 100,<br />
	table_row_limit : 5,<br />
	table_col_limit : 5,<br />
	theme_advanced_toolbar_location : "top",<br />
	theme_advanced_toolbar_align : "left",<br />
	theme_advanced_path_location : "bottom",<br />
	plugin_insertdate_dateFormat : "%Y-%m-%d",<br />
	plugin_insertdate_timeFormat : "%H:%M:%S",<br />
	extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",<br />
	external_link_list_url : "example_data/example_link_list.js",<br />
	external_image_list_url : "example_data/example_image_list.js",<br />
	flash_external_list_url : "example_data/example_flash_list.js"<br />
});<br />
&lt;/script&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;br&gt;<br />
&lt;center&gt;<br />
&lt;table width="850" border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse"&gt;<br />
  &lt;?php<br />
    if($_SESSION['adminloggedin'] == '1') {<br />
  ?&gt;<br />
    &lt;tr&gt;<br />
     &lt;td bgcolor="#0033CC" class="tabletop2" align="center" height="75px"&gt;<br />
       &lt;a class="adminlink" href="index.php"&gt;Home&lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;a class="adminlink" href="?action=manage_media"&gt;Affiliate Pages&lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;a class="adminlink" href="?action=manage_advertiser"&gt;CJ Advertisers&lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;a class="adminlink" href="?action=manage_cats"&gt;Categories&lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;a class="adminlink" href="?action=manage_pages"&gt;Pages&lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;a class="adminlink" href="?action=manage_users"&gt;Users &lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;a class="adminlink" href="?action=manage_links"&gt;Links&lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;!--&lt;a class="adminlink" href="?action=manage_advertisment"&gt;&lt;s&gt;Ads&lt;/s&gt;&lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;--&gt;<br />
       &lt;a class="adminlink" href="?action=aff"&gt;Affiliate Info&lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;a class="adminlink" href="?action=settings"&gt;Settings&lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;a class="adminlink" href="?action=checkin"&gt;Submissions&lt;/a&gt; (&lt;?=$pending?&gt;) &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;a class="adminlink" href="?action=reported"&gt;Reported&lt;/a&gt; (&lt;?=$reported?&gt;)<br />
      &lt;hr width="80%"&gt;<br />
       &lt;a class="adminlink" href="?action=add_media"&gt;Add Article&lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;a class="adminlink" href="?action=add_advertiser"&gt;Add Advertiser&lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;a class="adminlink" href="?action=add_cat"&gt;Add Category&lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;a class="adminlink" href="?action=add_page"&gt;Add Page&lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;a class="adminlink" href="?action=add_link"&gt;Add Link&lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;a class="adminlink" href="index.php?action=logout"&gt;Log Out&lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;a class="adminlink" href="&lt;? echo $site_url; ?&gt;/index.php" target="_blank"&gt;View Site&lt;/a&gt;<br />
     &lt;/td&gt;<br />
    &lt;/tr&gt;<br />
  &lt;?php<br />
    }<br />
  ?&gt;<br />
    &lt;tr&gt;<br />
     &lt;td class="maintable" align="center"&gt;<br />
     &lt;br&gt;<br />
        &lt;table width="90%" border="0" cellspacing="0" cellpadding="0" class="table"&gt;<br />
        &lt;tr&gt;<br />
          &lt;td background="./images/menu2.png" bgcolor="#0066FF" class="tabletop"&gt;<br />
            &lt;b&gt;&nbsp;&nbsp;&lt;?php admin_title($action)?&gt;&lt;/b&gt;<br />
          &lt;/td&gt;<br />
        &lt;/tr&gt;<br />
        &lt;tr&gt;<br />
        &lt;td bgcolor="#FFFFFF" align="center"&gt;<br />
        &lt;div style="width:95%; text-align:left;"&gt;<br />
&lt;?php<br />
  if($_SESSION['adminloggedin'] == '1')<br />
  {<br />
     if ($action == 'add_media')     { include('admin-add-media.php'); }<br />
     elseif ($action == 'add_link') { include('admin-add-link.php'); }<br />
     elseif ($action == 'add_cat')  { include('admin-add-cat.php'); }<br />
     elseif ($action == 'add_page') { include('admin-add-page.php'); }<br />
     elseif ($action == 'add_advertisments') { include('admin-add-advertisment.php'); }<br />
     elseif ($action == 'aff') { include('admin-affiliate.php'); }<br />
     elseif ($action == 'add_advertiser') { include('admin-add-advertiser.php'); }<br />
     elseif ($action == 'edit_media') { include('admin-edit-media.php'); }<br />
     elseif ($action == 'edit_advertiser') { include('admin-edit-advertiser.php'); }<br />
     elseif ($action == 'edit_link') { include('admin-edit-link.php'); }<br />
     elseif ($action == 'edit_cat')  { include('admin-edit-cat.php'); }<br />
     elseif ($action == 'edit_page') { include('admin-edit-page.php'); }<br />
     elseif ($action == 'edit_user') { include('admin-edit-user.php'); }<br />
     elseif ($action == 'edit_advertisment') { include('admin-edit-advertisment.php'); }<br />
     elseif ($action == 'manage_media') { include('admin-manage-media.php'); }<br />
     elseif ($action == 'manage_advertiser') { include('admin-manage-advertiser.php'); }<br />
     elseif ($action == 'manage_links') { include('admin-manage-links.php'); }<br />
     elseif ($action == 'manage_cats')  { include('admin-manage-cats.php'); }<br />
     elseif ($action == 'manage_pages') { include('admin-manage-pages.php'); }<br />
     elseif ($action == 'manage_users') { include('admin-manage-users.php'); }<br />
     elseif ($action == 'manage_advertisment') { include('admin-manage-advertisment.php'); }<br />
     elseif ($action == 'reported')     { include ('admin-reported.php'); }<br />
              elseif ($action == 'delete_done')<br />
              {<br />
                 mysql_query("DELETE FROM `".$SQL_Ext."_media` WHERE `id` = '$id'");<br />
                 if ($_GET['check'] == 1)<br />
                  { header("Location: index.php?action=checkin&#038;message=Link%20Deleted"); exit; }<br />
                 else<br />
                  { header("Location: index.php?action=manage_media&#038;message=Article%20Deleted"); exit; }<br />
              }<br />
              elseif ($action == 'delete_user_done')<br />
              {<br />
                 mysql_query("DELETE FROM ".$SQL_Ext."_users WHERE id='$id'");<br />
                 header("Location: index.php?action=manage_users&#038;message=User%20deleted");<br />
                 exit;<br />
              }<br />
              elseif ($action == 'delete_cat_done')<br />
              {<br />
                 mysql_query("DELETE FROM ".$SQL_Ext."_cats WHERE id='$id'");<br />
                 header("Location: index.php?action=manage_cats&#038;message=Category%20deleted");<br />
                 exit;<br />
              }<br />
              elseif ($action == 'delete_comment')<br />
              {<br />
                 mysql_query("DELETE FROM ".$SQL_Ext."_comments WHERE id='$id'");<br />
                 header("Location: $site_url/index.php?task=view&#038;id=".makesafe($_GET['link_id']));<br />
                 exit;<br />
              }<br />
              elseif ($action == 'delete_page_done')<br />
              {<br />
                 mysql_query("DELETE FROM ".$SQL_Ext."_pages WHERE id='$id'");<br />
                 header("Location: index.php?action=manage_pages&#038;message=Page%20deleted");<br />
                 exit;<br />
              }<br />
              elseif ($action == 'link_delete_done')<br />
              {<br />
                 mysql_query("DELETE FROM `".$SQL_Ext."_links` WHERE `id` = '$id'");<br />
                 if ($_GET[check] == 1) { header("Location: index.php?action=checkin&#038;message=Unpublished link%20deleted"); exit; }<br />
                 else { header("Location: index.php?action=manage_links&#038;message=Link%20deleted"); exit; }<br />
              }<br />
              elseif ($action == 'config_view')<br />
              {<br />
                  include('config_view.php');<br />
              }<br />
              elseif ($action == 'new_pass')<br />
              {<br />
                  include('admin-new-pass.php');<br />
              }<br />
              elseif ($action == 'settings')<br />
              {<br />
                  include('settings.php');<br />
              }<br />
              elseif ($action == 'checkin')<br />
              {<br />
                  include('admin-checkin.php');<br />
              }<br />
              elseif ($action == 'checkin_done')<br />
              {<br />
                  include('admin-check.php');<br />
              }<br />
              elseif ($action == 'logout')<br />
              {<br />
                  session_destroy();<br />
                  header("Location: index.php");<br />
                  exit;<br />
              }<br />
              else<br />
              {<br />
                  include('./admin-main.php');<br />
              }<br />
  }<br />
  else<br />
  {<br />
     include_once('./admin-login-form.php');<br />
  }<br />
?&gt;<br />
&lt;br&gt;<br />
&lt;/div&gt;<br />
        &lt;/td&gt;<br />
        &lt;/tr&gt;<br />
        &lt;/table&gt;<br />
      &lt;br&gt;<br />
      &lt;br&gt;<br />
     &lt;/td&gt;<br />
    &lt;/tr&gt;<br />
    &lt;/table&gt;<br />
&lt;/center&gt;<br />
&lt;br&gt;<br />
&lt;br&gt;<br />
&lt;/body&gt;&lt;/html&gt;<br />
&lt;?php<br />
  mysql_close();<br />
?&gt;<br />
</code></p>
<p>A brief glimpse of what we have done here: At the beginning, we start the session. If admin is not logged in during the session, the script will take you to a login page, otherwise, it will load the page requested based on the action. Starting on line 117 you will see the code that makes this happen.</p>
<p>Basically what we have done is created a universal page for our site now. All that we will need to do is create a page that writes the page titles and each page for the admin script.</p>
<p>At this point, we are going to write our titles page, which will consist of a function that tells the script how to write each page title. In a new php editor window, let&#8217;s create our admin-titles.php file. (Script->admin->admin-titles.php)</p>
<p>Here is the code that we will use for admin-titles.php:<br />
<code><br />
&lt;?php<br />
function admin_title($action) {<br />
if($action == 'add_advertiser') {<br />
echo 'Add Advertiser';}<br />
if($action == 'edit_advertiser') {<br />
echo 'Edit Advertiser';}<br />
if($action == 'manage_advertiser') {<br />
echo 'Manage Advertiser';}<br />
if($action == 'aff') {<br />
echo 'Edit Affiliate Information';}<br />
else if($action == 'edit_media') {<br />
echo 'Edit Affiliate Page';}<br />
else if($action == 'add_link') {<br />
echo 'Add Link';}<br />
else if($action == 'edit_link') {<br />
echo 'Edit Link';}<br />
else if($action == 'manage_links') {<br />
echo 'Manage Links';}<br />
else if($action == 'edit_cat') {<br />
echo 'Edit Category';}<br />
else if($action == 'edit_user') {<br />
echo 'Edit User';}<br />
else if($action == 'add_page') {<br />
echo 'Add Page';}<br />
else if($action == 'edit_page') {<br />
echo 'Edit Page';}<br />
else if($action == 'manage_pages') {<br />
echo 'Manage Pages';}<br />
else if($action == 'add_cat') {<br />
echo 'Add Category';}<br />
else if($action == 'new_pass') {<br />
echo 'Set new password for user';}<br />
else if($action == 'manage') {<br />
echo 'Manage Affiliate pages';}<br />
else if($action == 'manage_cats') {<br />
echo 'Manage Catergories';}<br />
else if($action == 'manage_users') {<br />
echo 'Manage Users';}<br />
else if($action == 'settings') {<br />
echo 'Settings';}<br />
else if(!isset($_GET['cat_id'])){<br />
echo 'Admin Home';}}<br />
?&gt;<br />
</code><br />
On line 2 we start the function by defining it. The rest of the page tells the function to look at the action. If action = this then we need to write this.</p>
<p>To finish this article up, we are going to write our admin-main.php file. The admin-main page will allow us to edit our homepage text and our paypal address.</p>
<p>In a new php editor, create a file named admin-main.php. (Script->admin->admin-main.php)</p>
<p>Here is the code that we will use for this page:<br />
<code>&lt;? defined( 'ADMIN_ACCESS' ) or die( '' );<br />
if ($_GET[done] == 1)<br />
{<br />
  $homepage = makesafe($_POST['homepage']);<br />
  $paypal = makesafe($_POST['paypal']);<br />
  mysql_query("UPDATE ".$SQL_Ext."_sitespecs SET homepage='".$homepage."', paypal_id='".$paypal."'");<br />
  header("Location: index.php?&#038;message=Settings%20Changed");<br />
}<br />
else<br />
{<br />
$sql = mysql_query("SELECT * FROM ".$SQL_Ext."_sitespecs");<br />
$row = mysql_fetch_assoc($sql);<br />
if ($_GET['message']) {<br />
echo '&lt;div align="center" class="style2"&gt;&lt;br&gt;'.makesafe($_GET['message']).'&lt;br /&gt;&lt;/div&gt;'; }<br />
?&gt;<br />
  &lt;br&gt;<br />
  &lt;table width="100%" border="0" cellspacing="0" cellpadding="0"&gt;<br />
    &lt;tr&gt;<br />
      &lt;td&gt;<br />
 &lt;br&gt;<br />
 &lt;form method="post" action="index.php&#038;done=1"&gt;<br />
&lt;strong&gt;Homepage Text&lt;/strong&gt;&lt;br/&gt;<br />
&lt;textarea cols="70" rows="6" name="homepage"&gt;<br />
&lt;?php echo $row['homepage']; ?&gt;<br />
&lt;/textarea&gt;<br />
&lt;br/&gt;<br />
Paypal Address&lt;br/&gt;<br />
&lt;input type="text" name="paypal" size="70" value="&lt;?php echo $row['paypal_id']; ?&gt;"/&gt;<br />
&lt;input type="submit" name="submit" value="Update"/&gt;<br />
&lt;/form&gt;<br />
      &lt;/td&gt;<br />
    &lt;/tr&gt;<br />
  &lt;/table&gt;<br />
  &lt;?}?&gt;<br />
</code><br />
In the first few lines of code we are telling the page that to check and see if we are done editing. If we are done editing, we need to post the values that we entered in and insert them into the database using the UPDATE sql query.</p>
<p>If we are NOT done editing, then we need to query the database and get the current settings so that they can be edited. We will insert the values of the the homepage in a textarea for easy editing and the paypal address we will place into an input box. </p>
<p>We DO need to display the current information so that we can edit it so we echo the values for those two rows out of the db.</p>
]]></content:encoded>
			<wfw:commentRss>http://phppig.org/203/creating-basic-admin-section-part-2-of-building-full-php-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a php script to sell products</title>
		<link>http://phppig.org/193/creating-a-php-script-to-sell-products/</link>
		<comments>http://phppig.org/193/creating-a-php-script-to-sell-products/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 08:41:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://phppig.org/?p=193</guid>
		<description><![CDATA[<p>Ever wonder how some people are able to get sites up and going giving them access to update the content on the site and add pages of new products without knowing a single thing about html?</p>
<p>Marketing a new and exciting product is just one way to make money online. You will find that there is much <span style="color:#777"> . . . &#8594; Read More: <a href="http://phppig.org/193/creating-a-php-script-to-sell-products/">Creating a php script to sell products</a></span>]]></description>
			<content:encoded><![CDATA[<p>Ever wonder how some people are able to get sites up and going giving them access to update the content on the site and add pages of new products without knowing a single thing about html?</p>
<p>Marketing a new and exciting product is just one way to make money online. You will find that there is much more money to be made when you have a service to offer people who are just starting out online. </p>
<p>Follow this series of posts in the members section. By the end of the posts, you will have a working content management system with a shopping cart that ACTUALLY works! Plus, you can learn how to <strong>manipulate php to appear as different file types</strong>, build a MySQL database, build a functioning script that works around the MySQL database, and how to write files on the fly&#8230;.Plus let&#8217;s not forget about the making php code to look and quack like xml, yet it is really still php!</p>
<p>We will include all sorts of tools that <i><b><u>EVERY WEBMASTER AND USER NEEDS AND DESIRES</u></b></i>. Goodies will include: RSS feed of products, on the fly XML sitemap, podcasting abilities, RSS feed for podcasts that goes directly to iTunes, shopping cart that will work with paypal (will also show you how to use it with clickbank), easy to use WYSIWYG editor in the admin area that gives you COMPLETE CONTROL over the page being created, and much, much more!</p>
<p>To view a sample of the script that we will be coding, visit <a href="http://scottpdaugherty.com">my personal website</a>. I coded this script and will include the source code to the WHOLE PROJECT as a download at the end of the tutorial.</p>
<p>You won&#8217;t want to miss this advanced lesson on how to create your own working php script that you can customize and sell to people, gaining you respect as a coder and giving your customer a very useful product that they will very likely pay hundreds or thousands of dollars for!</p>
<p>Look in the Member&#8217;s Only section to read this series of articles.</p>
]]></content:encoded>
			<wfw:commentRss>http://phppig.org/193/creating-a-php-script-to-sell-products/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Amazon, CJ, and eBay WordPress classes</title>
		<link>http://phppig.org/184/amazon-cj-and-ebay-wordpress-classes/</link>
		<comments>http://phppig.org/184/amazon-cj-and-ebay-wordpress-classes/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 08:01:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Wordpress Plugins]]></category>
		<category><![CDATA[amazon associate webservices]]></category>
		<category><![CDATA[cj webservices]]></category>
		<category><![CDATA[ebay partner network]]></category>

		<guid isPermaLink="false">http://phppig.org/?p=184</guid>
		<description><![CDATA[<p>I am considering having a member&#8217;s only area where member will be able to view and download source code for Amazon, commission junction and eBay affiliate program plugins. </p>
<p>Still just thinking about it now. If this were to happen, how many people would actually be interested in this? Comment to this post if you would be <span style="color:#777"> . . . &#8594; Read More: <a href="http://phppig.org/184/amazon-cj-and-ebay-wordpress-classes/">Amazon, CJ, and eBay WordPress classes</a></span>]]></description>
			<content:encoded><![CDATA[<p>I am considering having a member&#8217;s only area where member will be able to view and download source code for Amazon, commission junction and eBay affiliate program plugins. </p>
<p>Still just thinking about it now. If this were to happen, how many people would actually be interested in this? Comment to this post if you would be interested in viewing and downloading source code, having videos readily available on how to use the code, and instructions on how to make plugins and making your own comparison shopping plugin. Maybe even have code samples and instructions on how to make your own complete affiliate script!</p>
<p>Debating on it&#8230;.Let me know what you think.</p>
]]></content:encoded>
			<wfw:commentRss>http://phppig.org/184/amazon-cj-and-ebay-wordpress-classes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Protected: Interpreting data from CJ API Rest call</title>
		<link>http://phppig.org/169/interpreting-data-from-cj-api-rest-call/</link>
		<comments>http://phppig.org/169/interpreting-data-from-cj-api-rest-call/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 08:21:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://phppig.org/?p=169</guid>
		<description><![CDATA[There is no excerpt because this is a protected post.]]></description>
			<content:encoded><![CDATA[<form action="http://phppig.org/wp-pass.php" method="post">
<p>This post is password protected. To view it please enter your password below:</p>
<p><label for="pwbox-169">Password:<br />
<input name="post_password" id="pwbox-169" type="password" size="20" /></label><br />
<input type="submit" name="Submit" value="Submit" /></p></form>
]]></content:encoded>
			<wfw:commentRss>http://phppig.org/169/interpreting-data-from-cj-api-rest-call/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Protected: CJ Webservices REST API call code</title>
		<link>http://phppig.org/161/cj-webservices-rest-api-call/</link>
		<comments>http://phppig.org/161/cj-webservices-rest-api-call/#comments</comments>
		<pubDate>Sun, 29 Aug 2010 22:57:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://phppig.org/?p=161</guid>
		<description><![CDATA[There is no excerpt because this is a protected post.]]></description>
			<content:encoded><![CDATA[<form action="http://phppig.org/wp-pass.php" method="post">
<p>This post is password protected. To view it please enter your password below:</p>
<p><label for="pwbox-161">Password:<br />
<input name="post_password" id="pwbox-161" type="password" size="20" /></label><br />
<input type="submit" name="Submit" value="Submit" /></p></form>
]]></content:encoded>
			<wfw:commentRss>http://phppig.org/161/cj-webservices-rest-api-call/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Action Affiliate Software presale</title>
		<link>http://phppig.org/103/action-affiliate-software-presal/</link>
		<comments>http://phppig.org/103/action-affiliate-software-presal/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 10:38:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://phppig.org/?p=103</guid>
		<description><![CDATA[Site error: the file <b>/homepages/43/d374880644/htdocs/phppig/wp-content/plugins/ActionAffiliate/includes/aafunctions.php</b> requires the ionCube PHP Loader ioncube_loader_lin_5.2.so to be installed by the site administrator.
