<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
      <title>PHP Problems - CSS-Tricks Forums</title>
      <link>http://www.css-tricks.com/forums/categories/php/feed.rss?_escaped_fragment_=%2Fpage_about_us</link>
      <pubDate>Sat, 25 May 13 23:02:46 -0400</pubDate>
         <description>PHP Problems - CSS-Tricks Forums</description>
   <language>en-CA</language>
   <atom:link href="/forums/discussions/feed.rss" rel="self" type="application/rss+xml" />
   <item>
      <title>Display custom taxonomy (like &quot;the_category&quot;) for custom post type</title>
      <link>http://www.css-tricks.com/forums/discussion/14788/display-custom-taxonomy-like-the_category-for-custom-post-type</link>
      <pubDate>Tue, 29 Nov 2011 06:09:39 -0500</pubDate>
      <dc:creator>jonedwards</dc:creator>
      <guid isPermaLink="false">14788@/forums/discussions</guid>
      <description><![CDATA[Hi there<br /><br />I have a custom post type, <em>"entrepreneurs"</em>, with a custom taxonomy, "sectors" attached to it. Here is <a rel="nofollow" href="http://codepad.org/ceQH4a6a">the code (http://codepad.org/ceQH4a6a)</a> for my custom post type registrations.<br /><br /><strong>Things you might need to know:</strong><br /><br /><ul><li>"Entrepreneurs" are heirachical, like pages.</li><li>"Sectors" are like the categories for the post type</li></ul><br /><br /><strong>What I want to do...</strong><br /><br />In both my archive and single views, I would like to display the assigned sector name for the post below the title - in the same way that you would in, say, a blog article, using "the_category" or something similar. Like so:<br /><br /><pre><code>&amp;lt;?php the_category('', '', $post_id) ?&amp;gt;</code></pre><br /><br />The full block of code can be <a rel="nofollow" href="http://codepad.org/ub3c9N9P">found here (http://codepad.org/ub3c9N9P)</a>.<br /><br />I want the H4 to output the custom taxonomy, without a link - resulting in the following <a rel="nofollow" href="http://db.tt/xiL3w0ty">layout (http://db.tt/xiL3w0ty)</a>. The grey text below the title is sector taxonomy.<br /><br />I've tried a number of solutions found on various forums and resources, but none are working for me. Any help would be appreciated.<br /><br />Thanks in advance.<br />]]></description>
   </item>
   <item>
      <title>WooCommerce - Display all product variations on Shop Index page?</title>
      <link>http://www.css-tricks.com/forums/discussion/25232/woocommerce-display-all-product-variations-on-shop-index-page</link>
      <pubDate>Sat, 25 May 2013 07:55:53 -0400</pubDate>
      <dc:creator>croydon86</dc:creator>
      <guid isPermaLink="false">25232@/forums/discussions</guid>
      <description><![CDATA[<p>Hi all</p>

<p>I would like to know if there was a way to display different product variations of the same product as separate items in the Shop Index/category page.</p>

<p>For example, lets say I create a product, a Tshirt that comes in white and black. I create this as one product with two colour options.</p>

<p>Currently, in the main Shop index, this displays only the default colour I set (black). I would like to display both the black and white options, so when the user clicks on either, they will be taken to the same page.</p>

<p>The only way I can think of (which I would like to avoid) is to create them as two separate products.</p>

<p>Is there a better way to do this?</p>

<p>Thanks in advance</p>
]]></description>
   </item>
   <item>
      <title>Form Won&#039;t Submit</title>
      <link>http://www.css-tricks.com/forums/discussion/25178/form-won039t-submit</link>
      <pubDate>Thu, 23 May 2013 11:10:02 -0400</pubDate>
      <dc:creator>LaurelBrittany</dc:creator>
      <guid isPermaLink="false">25178@/forums/discussions</guid>
      <description><![CDATA[<p>I am having trouble getting my form to submit. It was working until I added the code for the drop down menu, and now it won't submit anymore. <a href="http://lwebdesigns.net/tools/forms/form.php" target="_blank" rel="nofollow">http://lwebdesigns.net/tools/forms/form.php</a></p>

<pre class="codepen"><code>&lt;?php
$errors = array();
$missing = array();
if (isset($_POST['send'])) {
  $to = 'pehrson.laurel@yahoo.com';
  $subject = 'Feedback from contact form';
  $expected = array('name', 'email', 'comments', 'gender', 'terms', 'extras', 'os');
  $required = array('name', 'email', 'comments', 'terms', 'os');
  if (!isset($_POST['extras'])) {
    $_POST['extras'] = array();
  }
  $minimumChecked = 2;
  if (count($_POST['extras']) &lt; $minimumChecked) {
    $errors['extras'] = true;
  }
  if (!isset($_POST['terms'])) {
  $_POST['terms'] = '';
  $errors['terms'] = true;
  }
  $headers = &quot;From: webmaster@example.com\r\n&quot;;
  $headers .= &quot;Content-type: text/plain; charset=utf-8&quot;;
  $authenticate = '-fpehrson.laurel@yahoo.com';
  require 'mail_process.php';
  if ($mailSent) {
    header('Location: thanks.php');
    exit;
  }
}
?&gt;
&lt;!DOCTYPE HTML&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta charset=&quot;utf-8&quot;&gt;
&lt;title&gt;Contact Us&lt;/title&gt;
&lt;link href=&quot;../styles.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Contact Us&lt;/h1&gt;
&lt;?php if (($_POST &amp;&amp; $suspect) || ($_POST &amp;&amp; isset($errors['mailfail']))) { ?&gt;
&lt;p class=&quot;warning&quot;&gt;Sorry your mail could not be sent.&lt;/p&gt;

&lt;?php } elseif ($errors || $missing) { ?&gt;
&lt;p class=&quot;warning&quot;&gt;Please fix the item(s) indicated.&lt;/p&gt;
&lt;?php }?&gt;
&lt;form name=&quot;contact&quot; method=&quot;post&quot; action=&quot;&lt;?php echo $_SERVER['PHP_SELF']; ?&gt;&quot;&gt;
&lt;p&gt;
  &lt;label for=&quot;name&quot;&gt;Name:
  &lt;?php if ($missing &amp;&amp; in_array('name', $missing)) { ?&gt;
  &lt;p class=&quot;warning&quot;&gt;Please enter your name&lt;/p&gt;
  &lt;?php } ?&gt;
  &lt;/label&gt;
  &lt;input type=&quot;text&quot; name=&quot;name&quot; id=&quot;name&quot;
  &lt;?php
  if ($errors || $missing) {
    echo 'value=&quot;' . htmlentities($name, ENT_COMPAT, 'utf-8') . '&quot;';
    }
    ?&gt;
  &gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;label for=&quot;email&quot;&gt;Email
  &lt;?php if ($missing &amp;&amp; in_array('email', $missing)) { ?&gt;
  &lt;p class=&quot;warning&quot;&gt;Please enter your email address&lt;/p&gt;
  &lt;?php } elseif (isset($errors['email'])) { ?&gt;
  &lt;p class=&quot;warning&quot;&gt;Invalid email address&lt;/p&gt;
  &lt;?php } ?&gt;
  &lt;/label&gt;
  &lt;input type=&quot;text&quot; name=&quot;email&quot; id=&quot;email&quot;
    &lt;?php
  if ($errors || $missing) {
    echo 'value=&quot;' . htmlentities($email, ENT_COMPAT, 'utf-8') . '&quot;';
    }
    ?&gt;
    &gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;label for=&quot;comments&quot;&gt;Comments:
  &lt;?php if ($missing &amp;&amp; in_array('comments', $missing)) { ?&gt;
  &lt;p class=&quot;warning&quot;&gt;You forgot to add your comments&lt;/p&gt;
  &lt;?php } ?&gt;
  &lt;/label&gt;
  &lt;textarea name=&quot;comments&quot; id=&quot;comments&quot;&gt;&lt;?php
  if ($errors || $missing) {
    echo htmlentities($comments, ENT_COMPAT, 'utf-8');
    }
  ?&gt;&lt;/textarea&gt;
&lt;/p&gt;
&lt;fieldset&gt;&lt;legend&gt;Gender &lt;?php
if ($missing &amp;&amp; in_array('gender', $missing)) {?&gt;
&lt;p class=&quot;warning&quot;&gt;Please select a value&lt;/p&gt;&lt;?php } ?&gt;&lt;/legend&gt;&lt;p&gt;
&lt;input type=&quot;radio&quot; name=&quot;gender&quot; value=&quot;f&quot; id=&quot;gender_f&quot;
  &lt;?php
  if ($_POST &amp;&amp; $gender == 'f') {
  echo 'checked';
  }
  ?&gt;
  &gt;
  
&lt;label for=&quot;gender_f&quot;&gt;Female&lt;/label&gt;
&lt;input type=&quot;radio&quot; name=&quot;gender&quot; value=&quot;m&quot; id=&quot;gender_m&quot;
&lt;?php
  if ($_POST &amp;&amp; $gender == 'm') {
  echo 'checked';
  }
  ?&gt;
  &gt;
&lt;label for=&quot;gender_m&quot;&gt;Male&lt;/label&gt;
&lt;input type=&quot;radio&quot; name=&quot;gender&quot; value=&quot;won't say&quot; id=&quot;gender_0&quot;
&lt;?php
  if (!$_POST || $gender == &quot;won't say&quot;) {
  echo 'checked';
  }
  ?&gt;
  &gt;
&lt;label for=&quot;gender_0&quot;&gt;Rather not say&lt;/label&gt;
&lt;/fieldset&gt;
&lt;/p&gt;
&lt;fieldset&gt;&lt;legend&gt;Optional Extras: &lt;?php if (isset($errors['extras'])) { ?&gt;
  &lt;p&gt;Please select at least &lt;?php echo $minimumChecked; ?&gt;&lt;/p&gt;
  &lt;?php } ?&gt;&lt;/legend&gt;&lt;p&gt;
  &lt;input type=&quot;checkbox&quot; name=&quot;extras[]&quot; value=&quot;sun roof&quot; id=&quot;extras_0&quot;
  &lt;?php
  if ($_POST &amp;&amp; in_array('sun roof', $extras)) {
    echo 'checked';
  }
  ?&gt;
  &gt;
  &lt;label for=&quot;extras_0&quot;&gt;Sun roof&lt;/label&gt;
  &lt;br /&gt;
  &lt;input type=&quot;checkbox&quot; name=&quot;extras[]&quot; value=&quot;aircon&quot; id=&quot;extras_1&quot;
    &lt;?php
  if ($_POST &amp;&amp; in_array('aircon', $extras)) {
    echo 'checked';
  }
  ?&gt;
  &gt;
  &lt;label for=&quot;extras_1&quot;&gt;Air conditioning&lt;/label&gt;
  &lt;br /&gt;
  &lt;input type=&quot;checkbox&quot; name=&quot;extras[]&quot; value=&quot;automatic&quot; id=&quot;extras_2&quot;
    &lt;?php
  if ($_POST &amp;&amp; in_array('automatic', $extras)) {
    echo 'checked';
  }
  ?&gt;
  &gt;
  &lt;label for=&quot;extras_2&quot;&gt;Automatic transmission&lt;/label&gt;
  &lt;/p&gt;&lt;/fieldset&gt;
&lt;p&gt;
&lt;label for=&quot;os&quot;&gt;Operating system:&lt;?php if ($missing &amp;&amp; in_array('os', $missing)) { ?&gt;
&lt;p class=&quot;warning&quot;&gt;Please make a selection&lt;/p&gt;
&lt;?php } ?&gt;&lt;/label&gt;
&lt;select name=&quot;os&quot; id=&quot;os&quot;&gt;
  &lt;option value=&quot;&quot; &lt;?php if (!$_POST || $os == '') {
    echo 'selected';
    } ?&gt;&gt;Please make a selection&lt;/option&gt;
  &lt;option value=&quot;Linux&quot; &lt;?php if ($_POST &amp;&amp; $os == 'Linux') {
    echo 'selected';
  } ?&gt;
  &gt;Linux&lt;/option&gt;
  &lt;option value=&quot;Mac&quot;&lt;?php if ($_POST &amp;&amp; $os == 'Mac') {
    echo 'selected';
  } ?&gt;&gt;Mac OS X&lt;/option&gt;
  &lt;option value=&quot;Windows&quot;&lt;?php if ($_POST &amp;&amp; $os == 'Windows') {
    echo 'selected';
  } ?&gt;&gt;Windows&lt;/option&gt;
&lt;/select&gt;
&lt;/p&gt;

&lt;p&gt;
  &lt;input type=&quot;checkbox&quot; name=&quot;terms&quot; id=&quot;terms&quot; value=&quot;Agreed&quot;
  &lt;?php
  if ($_POST &amp;&amp; $terms) {
    echo 'checked';
  }
  ?&gt;
  &gt;
  &lt;label for=&quot;terms&quot;&gt;I agree to the terms and conditions
  &lt;?php if ($missing &amp;&amp; in_array('terms', $missing)) { ?&gt;
  &lt;p&gt;Please signify acceptance&lt;/p&gt;
  &lt;?php } ?&gt;
  &lt;/label&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;input type=&quot;submit&quot; name=&quot;send&quot; id=&quot;send&quot; value=&quot;Send Comments&quot;&gt;
&lt;/p&gt;
&lt;/form&gt;

&lt;/body&gt;
&lt;/html&gt;

</code><a rel="nofollow" href="http://codepen.io/chibiwawa/pen/iHocl">Check out this Pen!</a></pre>


]]></description>
   </item>
   <item>
      <title>Just finished the PHP class on Codecademy.com... Now what?</title>
      <link>http://www.css-tricks.com/forums/discussion/25067/just-finished-the-php-class-on-codecademy-com-now-what</link>
      <pubDate>Tue, 21 May 2013 18:04:43 -0400</pubDate>
      <dc:creator>Joe_Temp</dc:creator>
      <guid isPermaLink="false">25067@/forums/discussions</guid>
      <description><![CDATA[<p>I just finished the class/module on PHP on Codecademy.com. I'm wondering where I should go from here.</p>

<p>Should I continue reading up on PHP and going into some intermediate stuff or should I just try to start working with what I know?</p>

<p>Maybe the best thing would be to scratch build a Wordpress theme so I can tackle some real-world problems?</p>

<p>What does everyone think?</p>
]]></description>
   </item>
   <item>
      <title>How to create Mail-to Form?</title>
      <link>http://www.css-tricks.com/forums/discussion/25083/how-to-create-mail-to-form</link>
      <pubDate>Wed, 22 May 2013 04:28:37 -0400</pubDate>
      <dc:creator>abhaykatre</dc:creator>
      <guid isPermaLink="false">25083@/forums/discussions</guid>
      <description><![CDATA[<p>So I'm currently using the form given here:
<a href="http://boxiedesigner.com/web-design/creating-an-html5-and-css3-form-using-the-new-form-types/" target="_blank" rel="nofollow">http://boxiedesigner.com/web-design/creating-an-html5-and-css3-form-using-the-new-form-types/</a></p>

<p>It's a CSS form, I've customised it in terms of design.. But I can't find a way to make the form send an Email using PHP.</p>

<p>Also, when clicking the submit button, I just want a pop-up box that says "Successful!" instead being sent to another page.</p>

<p>Please help me with WHERE to put the PHP code.</p>

<p>Thanks a lot in advance! :)</p>
]]></description>
   </item>
   <item>
      <title>&quot;Events list&quot; HELP in WP custom theme for client ..</title>
      <link>http://www.css-tricks.com/forums/discussion/25032/events-list-help-in-wp-custom-theme-for-client-</link>
      <pubDate>Mon, 20 May 2013 22:42:17 -0400</pubDate>
      <dc:creator>dominick1</dc:creator>
      <guid isPermaLink="false">25032@/forums/discussions</guid>
      <description><![CDATA[<p>ok so i am having a problem trying to get my events to only display if the date has not already passed. meaning pretty much if the date is anything less then today dont show it. Ive been wrastling with this for a few hours now and i am in much need of help. ive tried all diff kinds of things.</p>

<p>i am using wordpress and i am also using the custom post types plugin and custom post types ui plugin.</p>

<p>the custom field i am trying to grab the date from and use to compare is called "date_of_event" and it is being created with the datepicker.</p>

<p>if you want to see a live version of what i have now it is indeed live on my server and its working as far as grabing the custom post type and displaying the date chosen by the date picker in the correct ASC order n stuff but for dates that have passed they are still showing as i have not written any logic to do so. this is what im having trouble with. this is the link --&gt; <a rel="nofollow" href="http://domenicocolandrea.com/tiki-bar/" title="domenicocolandrea.com/tiki-bar/">http://domenicocolandrea.com/tiki-bar/
</a></p>

<p>also if you want to see what my code looks like  a link to a .php file of the exact page is here --&gt;   <a rel="nofollow" href="https://www.dropbox.com/s/64zjakrkgtai1mn/eventsHELP.php" title="eventsHELP.php">https://www.dropbox.com/s/64zjakrkgtai1mn/eventsHELP.php</a></p>

<p>To anyone that responds i thank you ahead of time. if there is anything else you may need of me to provide in order to better tackle this please let me know and i will do so.</p>

<p>Thank you.
Dominick</p>
]]></description>
   </item>
   <item>
      <title>php mysql update query limit?</title>
      <link>http://www.css-tricks.com/forums/discussion/25088/php-mysql-update-query-limit</link>
      <pubDate>Wed, 22 May 2013 05:57:50 -0400</pubDate>
      <dc:creator>RajkumarLA</dc:creator>
      <guid isPermaLink="false">25088@/forums/discussions</guid>
      <description><![CDATA[<p><strong>Table:</strong> cquestions 
cqid, cqtext, showdate.</p>

<p>I want to update 'showdate' field to tomorrows date..</p>

<p><strong>database:</strong></p>

<pre><code>        cqid    cqtext    showdate
            200    q1    2013-05-22
            201    q2    0000-00-00
            202    q3    0000-00-00
</code></pre>

<p>the idea is to display only one question everyday. showdate is compared with the current date and display the first question q1. the starting date only store in db. now i want to update only the next row (q2)'s showdate to tomorrows date. next day wen q2 is displayed q3 will be updated to tomorrows date.
today  q1 displayed. db is like this.</p>

<pre><code>  cqid    cqtext    showdate
  200    q1    2013-05-22
  201    q2    2013-05-23
  202    q3    0000-00-00

tomorrow q2 displayed. then db 
cqid    cqtext    showdate
200    q1    2013-05-22
201    q2    2013-05-23
202    q3    2013-05-24
203    q4    0000-00-00 
</code></pre>

<p><strong>my code:</strong></p>

<pre><code>   $today=date("Y/m/d");
  $tomorrow= date("Y-m-d", strtotime("tomorrow"));
  echo "&lt;form method='post' id='submit' action='checkresult.php'&gt;";
  $sql="SELECT * FROM cquestions where showdate= '$today' limit 1";
  $result=mysql_query($sql);
  while ($row = mysql_fetch_array($result)) {
      $cqid=mysql_result($result,"cqid");
  $update1="update cquestions set showdate='$tomorrow' where showdate='0000-00-00' and cqid!='$cqid' order by cqid limit 1";
  mysql_query($update1);

  echo "&lt;p&gt;" . $row['cqtext'] . "&lt;/p&gt;";
  $sql2="SELECT * FROM canswers where cqid=".$row['cqid'];
  $result2=mysql_query($sql2);
  while($row2=mysql_fetch_assoc($result2)){
  echo "&lt;input type='radio' name='".$row['cqid']."' value='".$row2['cqans']."' /&gt;".$row2['aatext']; }
  /*echo "&lt;input type='hidden' name='email' value='email' /&gt;";*/
  }
  echo"&lt;input type='submit' id='submit' name='submit' value='Submit Answers' /&gt;";
  echo "&lt;/form&gt;";
  ?&gt;
</code></pre>

<p>this code update the next row, but the problem is its executed every time page loads and update the next row... i want to execute the update query only once for the day. how to do it?</p>
]]></description>
   </item>
   <item>
      <title>Twitter Feed</title>
      <link>http://www.css-tricks.com/forums/discussion/10967/twitter-feed</link>
      <pubDate>Fri, 25 Feb 2011 19:39:21 -0500</pubDate>
      <dc:creator>mwdewitt</dc:creator>
      <guid isPermaLink="false">10967@/forums/discussions</guid>
      <description><![CDATA[I am trying to create a Twitter feed on my WordPress page and I am using the Twitter RSS URL to grab the feed. The only problem is, it is showing the author of the feed, because it considers the Twitter comment and the author to be both part of the title, and I do not want that. I just want to show the comment. Here is an image with the author's name circled in red:<br /><br /><a href="http://img199.imageshack.us/img199/197/screenshot10s.png" target="_blank" rel="nofollow">http://img199.imageshack.us/img199/197/screenshot10s.png</a><br /><br />And here is the code I am using (excluding the RSS URL):<br /><br /><pre><code>&lt;?php if (function_exists('fetch_feed')) { ?&gt;<br />            <br />	 &lt;?php include_once(ABSPATH . WPINC . '/feed.php');<br />		$feed = fetch_feed('');<br />					<br />		$limit = $feed-&gt;get_item_quantity(2);<br />					<br />		$items = $feed-&gt;get_items(0, $limit);<br />					<br />		if (!$items) {<br />					<br />			echo &quot;problem&quot;;<br />						<br />		} else {<br />					<br />			//everything's cool<br />						<br />			foreach ($items as $item) { ?&gt;<br />						<br />				&lt;div class=&quot;sidebar-post&quot;&gt;<br />                                	&lt;ul id=&quot;title&quot;&gt;<br />                                		&lt;h5&gt;&lt;?php echo $item-&gt;get_date('F j, Y'); ?&gt;&lt;/h5&gt;<br />						&lt;?php echo $item-&gt;get_title(); ?&gt;<br />					&lt;/ul&gt;<br />				&lt;/div&gt;<br />                        <br />			&lt;?php }<br />					<br />		} ?&gt;<br />				<br />&lt;?php } ?&gt;</code></pre><br /><br />So how do I remove the author of the Twitter feed when it is considered part of the title? Thank you in advance.]]></description>
   </item>
   <item>
      <title>Cakephp+Twitterbootstrap</title>
      <link>http://www.css-tricks.com/forums/discussion/25082/cakephp-twitterbootstrap</link>
      <pubDate>Wed, 22 May 2013 03:56:31 -0400</pubDate>
      <dc:creator>gobibooma</dc:creator>
      <guid isPermaLink="false">25082@/forums/discussions</guid>
      <description><![CDATA[<p>Hai All, i am new to cakephp. I configured cakephp with twitter bootstrap layout for my project work.</p>

<p>When I create a twitter bootstrap alert message in index page, and clicked close button in alert, alert gets closed. But if i redirected to another page and created a alert message there, it's not possible to close my alert from that page.</p>

<p>Can any one help me to solve this problem..</p>

<p>I have attached my sample code also
<code></code></p>

<pre>
**model code:**

&lt;?php
class Task extends AppModel
{
   var $name = 'Task';

}
?&gt;

**Controller code:**

&lt;?php
class TasksController extends AppController
{
   var $name = 'Tasks';
   var $components = array('Session');
   var $helpers = array('Html', 'Form');
   public function beforeFilter() {
   parent::beforeFilter();
   }
   
   function index()
   {
   
   }

   function index1()
   {
   
   }

   
}

?&gt;

  **View code:(index.ctp)**
  
  
  
  
  
  
  
  
  
  
  &lt;?php echo $this-&gt;html-&gt;link('Click Me', array('action'=&gt;'index1')); ?&gt;
  
  
  
  &lt;?php
  echo $this-&gt;Form-&gt;create('Task',array('controller' =&gt; 'Tasks','action'=&gt;'index1'));
  echo $this-&gt;Form-&gt;submit('Click Me',array(' class'=&gt;'btn btn-success ',' name'=&gt;'commit' ,'type'=&gt;'submit' ,'value'=&gt;'Sign in' ));
  echo $this-&gt;Form-&gt;end();
  ?&gt;
     
     <button type="button" class="close">&times;</button>
     <strong>Warning!</strong> Best check yo self, you're not looking too good.
     
  
  
  
  
  
  
  **Index1.ctp:**
  
  
  
  Bootstrap 101 Template
  
  
  
  
  
     
     <button type="button" class="close">&times;</button>
     <strong>Warning!</strong> Best check yo self, you're not looking too good.
     
  
  
  
  
</pre>

<p>
Please give me suggestions to solve this error.</p>
]]></description>
   </item>
   <item>
      <title>htacces &amp; or PHP headache</title>
      <link>http://www.css-tricks.com/forums/discussion/25063/htacces-or-php-headache</link>
      <pubDate>Tue, 21 May 2013 16:09:45 -0400</pubDate>
      <dc:creator>KarimCossutti</dc:creator>
      <guid isPermaLink="false">25063@/forums/discussions</guid>
      <description><![CDATA[<p>Hi, i am desperate i know css tricks is front-end oriented but i'm hoping that a code ninja is on the watch, i currently have the code below to redirect all requests (except files) to the index.php unfortunately i cannot get my script to work because of some strange mime type error happening when my url ends with a slash.</p>

<p>The strange part is that my code output is the same with both urls but the error appears only in the / ending one.</p>

<p>So i'm looking for a way to redirect all request as it's working right now just withouth slash or just solve the mime type issue, but i have no idea what is causing it...</p>

<pre><code>&lt;IfModule mod_rewrite.c&gt;
  Options +FollowSymlinks
  # Options +SymLinksIfOwnerMatch
  RewriteEngine On

  # Redirect /index.php to / (optional, but recommended I guess)
  RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php
  RewriteRule ^index.php/?(.*)$ $1 [R=301,L]

  # Run everything else but real files through index.php
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ index.php/$1?%{QUERY_STRING} [L]
&lt;/IfModule&gt;
</code></pre>
]]></description>
   </item>
   <item>
      <title>Wrap wp_nav_menu output around option tags for select menu</title>
      <link>http://www.css-tricks.com/forums/discussion/25026/wrap-wp_nav_menu-output-around-option-tags-for-select-menu</link>
      <pubDate>Mon, 20 May 2013 17:29:07 -0400</pubDate>
      <dc:creator>croydon86</dc:creator>
      <guid isPermaLink="false">25026@/forums/discussions</guid>
      <description><![CDATA[<p>Hi all</p>

<p>I have set up a wp_nav_menu in Wordpress. I have 2 parent categories, with 2 sub-categories each, so this produces a nested list.</p>

<p>My current code to call this menu is...</p>

<pre><code>&lt;?php wp_nav_menu( 
          array( 
              'theme_location'    =&gt;  'shop-categories',
              'container'         =&gt;  'nav',
              'container_class'   =&gt;  'shop-cat'
          ) 
      ); ?&gt;
</code></pre>

<p>... which outputs this...</p>

<p>(I have simplified the code so you just get an idea of the markup)</p>

<pre><code>&lt;nav class="shop-cat"&gt;
  &lt;ul&gt;
    &lt;li&gt;
      &lt;a&gt;Clothing&lt;/a&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a&gt;T-Shirts&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a&gt;Tops&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;a&gt;Accessories&lt;/a&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a&gt;Earings&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a&gt;Hats&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/nav&gt;  
</code></pre>

<p>Now I would like to output this...</p>

<pre><code>&lt;select&gt;
  &lt;optgroup label="Clothing"&gt;
    &lt;option value="T-Shirts"&gt;T-Shirts&lt;/option&gt;
    &lt;option value="Tops"&gt;Tops&lt;/option&gt;
  &lt;/optgroup&gt;
  &lt;optgroup label="Accessories"&gt;
    &lt;option value="Earings"&gt;Earings&lt;/option&gt;
    &lt;option value="Hats"&gt;Hats&lt;/option&gt;
  &lt;/optgroup&gt;
&lt;/select&gt;
</code></pre>

<p>...is this possible to do dynamically? Or will it be better to do this manually? I have had a look around but couldn't find any help on this.</p>

<p>Any help appreciated.</p>
]]></description>
   </item>
   <item>
      <title>sending and receiving data on php</title>
      <link>http://www.css-tricks.com/forums/discussion/24925/sending-and-receiving-data-on-php</link>
      <pubDate>Thu, 16 May 2013 04:10:16 -0400</pubDate>
      <dc:creator>Rohithzr</dc:creator>
      <guid isPermaLink="false">24925@/forums/discussions</guid>
      <description><![CDATA[<p>i hav this form in index.php</p>

<pre><code>  &lt;form action="login.php" method="post"&gt;
  &lt;input type="text" id="txt" class="txt_box" placeholder="ITHC Username or Email" name="user_name"/&gt;
  &lt;input type="button" id="button" class="submit" value="LOG IN" /&gt;
  &lt;input type="submit" id="cancel" class="cancel" value="CANCEL" onClick="disablePopup()" /&gt;
  &lt;/form&gt;
</code></pre>

<p>then i want to send the values to login.php
process the data with mysql in login.php
and return the value / errors or data to index .php and display it</p>
]]></description>
   </item>
   <item>
      <title>.htaccess friendly url</title>
      <link>http://www.css-tricks.com/forums/discussion/25016/-htaccess-friendly-url</link>
      <pubDate>Mon, 20 May 2013 08:40:28 -0400</pubDate>
      <dc:creator>donpeppo</dc:creator>
      <guid isPermaLink="false">25016@/forums/discussions</guid>
      <description><![CDATA[<p>Hi!
I have a problem with my friendly urls.</p>

<p>I want everything after mydomain.com/ should be handled as ?page=</p>

<p>This is how far I've got so far in my .htaccess</p>

<pre><code>DirectoryIndex index.php
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]*)(.*) index.php?page=$1  [NC,L]
</code></pre>

<p>And it works pretty well if write /login my pagehandler catch it as <strong>?page=login</strong> 
but if you write an existing  filename it doesn't work.
Example: <strong>mydomain.com/folder</strong>  becomes <strong>mydomain.com/folder/</strong>  (adds a slash after)
Or if you write: <strong>mydomain.com/file.php</strong>  it loads that php file but i want it not to.
I want it to be handled as <strong>?page=file.php</strong></p>

<p>And i guess this may lead to problems linking to css, and js, if it does and you have any suggestions on how to solve that as well
i would be very thankfull.</p>

<p>I hope I'm not to confusing for you guys.
and thanks in advance for any help you can provide.</p>
]]></description>
   </item>
   <item>
      <title>hNews Microformat</title>
      <link>http://www.css-tricks.com/forums/discussion/25036/hnews-microformat</link>
      <pubDate>Tue, 21 May 2013 00:00:27 -0400</pubDate>
      <dc:creator>Jeager</dc:creator>
      <guid isPermaLink="false">25036@/forums/discussions</guid>
      <description><![CDATA[<p>So I am still working on a starter theme that suits me. I came across the  hNews Microformat of the "html5 reset" theme. I am using the loop as a template part that I can add where needed. My question is less of a php issue I guess, but more of a semantic issue.</p>

<pre><code>&lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;

  &lt;article &lt;?php post_class() ?&gt; id="post-&lt;?php the_ID(); ?&gt;"&gt;

    &lt;h1 class="entry-title"&gt;&lt;?php the_title(); ?&gt;&lt;/h1&gt;

    &lt;div class="entry-content"&gt;

      &lt;?php the_content(); ?&gt;

      &lt;?php wp_link_pages(array('before' =&gt; __('Pages: '), 'next_or_number' =&gt; 'number')); ?&gt;

      &lt;?php the_tags( __('Tags: '), ', ', ''); ?&gt;

      &lt;?php // posted_on(); ?&gt;

    &lt;/div&gt;

    &lt;?php edit_post_link(__('Edit this entry'),'','.'); ?&gt;

  &lt;/article&gt;

 &lt;?php comments_template(); ?&gt;

&lt;?php endwhile; endif; ?&gt;
</code></pre>

<p>If I use the article tag, is it okay to use this format to post pages also, or should I have another loop that will display the pages in a div rather than an article?</p>
]]></description>
   </item>
   <item>
      <title>FOR loop with counter in variables</title>
      <link>http://www.css-tricks.com/forums/discussion/25002/for-loop-with-counter-in-variables</link>
      <pubDate>Sun, 19 May 2013 21:31:03 -0400</pubDate>
      <dc:creator>Senff</dc:creator>
      <guid isPermaLink="false">25002@/forums/discussions</guid>
      <description><![CDATA[<p>So I have custom fields in Wordpress but they are not all required, so they may or may not exist. There's a maximum of 3, and I've named them product_image_1, product_image_2, product_image_3. etc.</p>

<p>Right now, I have this to write them:</p>

<pre><code>  the_field('product_image_1');
  the_field('product_image_2')';
  the_field('product_image_3')';
</code></pre>

<p>So I want to put this in a loop, and I thought this was the way to do it:</p>

<pre><code>  for($i=1; $i &lt;= 4; $i++) {
      the_field('${"product_image_" . $i}');
  }
</code></pre>

<p>But this doesn't seem to work and it doesn't write out anything but three times <code>&lt; img src="" &gt;</code>.</p>
]]></description>
   </item>
   <item>
      <title>border none last-child not working in php dynamic list</title>
      <link>http://www.css-tricks.com/forums/discussion/25022/border-none-last-child-not-working-in-php-dynamic-list</link>
      <pubDate>Mon, 20 May 2013 12:18:58 -0400</pubDate>
      <dc:creator>botpro7</dc:creator>
      <guid isPermaLink="false">25022@/forums/discussions</guid>
      <description><![CDATA[<p>hi guys, i'm trying to rid border bottom from the last div of php dynamic list. Any suggestion to make this work?</p>

<p>These are the <a rel="nofollow" href="http://codepen.io/botpro7/pen/JuEdp" title="codes">codes</a></p>

<p>Thanks in advanced.</p>
]]></description>
   </item>
   <item>
      <title>Limit WordPress URL length</title>
      <link>http://www.css-tricks.com/forums/discussion/14795/limit-wordpress-url-length</link>
      <pubDate>Tue, 29 Nov 2011 11:58:04 -0500</pubDate>
      <dc:creator>Johnnyb</dc:creator>
      <guid isPermaLink="false">14795@/forums/discussions</guid>
      <description><![CDATA[Hey all,<br /><br />I'm working on a rebuild of a site and trying to keep the new URL's the same as the old ones.  The old ones just use the post name but they appear to be limited to a certain number of characters, for example: <br /><code>www.example.com/news/boston-meets-with-life-sciences-economic-development-organization-from-</code><br /><br />The new URL generated by WordPress looks like this:<br /><code>www.example.com/news/boston-meets-with-life-sciences-economic-development-organization-from-europe/</code><br /><br />I know I can edit the permalink manually via the post editor, but as there are a lot of posts involved then I'm wondering if there's a way to limit the URL (to 100 characters for example) automatically?<br /><br />Any nudge in the right direction would be much appreciated!<br /><br />Thanks in advance!]]></description>
   </item>
   <item>
      <title>Change body background color each week from four set colors</title>
      <link>http://www.css-tricks.com/forums/discussion/25017/change-body-background-color-each-week-from-four-set-colors</link>
      <pubDate>Mon, 20 May 2013 08:48:33 -0400</pubDate>
      <dc:creator>digitalvaldosta</dc:creator>
      <guid isPermaLink="false">25017@/forums/discussions</guid>
      <description><![CDATA[<p>Where I work, they use colored tags that determine what week clothing items were received. They use only four colors (red, green, blue, yellow). We would like to create a page in which the background color changes to that week's color. I am sure this is simple but I am still new to PHP and am trying to automate trivial things like this as best as possible.</p>

<p>Thanks in advanced for your help.</p>

<p><a rel="nofollow" href="http://joshmcclanahan.com" title="Josh McClanahan">Josh McClanahan</a>
from <a rel="nofollow" href="http://digitalvaldosta.com" title="Digital Valdosta">Digital Valdosta</a></p>
]]></description>
   </item>
   <item>
      <title>Is it good to use header.php?</title>
      <link>http://www.css-tricks.com/forums/discussion/24992/is-it-good-to-use-header-php</link>
      <pubDate>Sun, 19 May 2013 10:08:03 -0400</pubDate>
      <dc:creator>Rohithzr</dc:creator>
      <guid isPermaLink="false">24992@/forums/discussions</guid>
      <description><![CDATA[<p>I was learning php and found a few articles, one of them was good and i understood php things from there. In that, there was a common Header.php for all files and a footer.php. Now as i am starting to create a new PHP based Forum then</p>

<ol>
<li>Should I use a common Header.php and Footer.php</li>
<li>I want to create a fluid Layout so is it ok to use Boilerplate.css [Dreamweaver's Fluid Design option]</li>
<li>Should i design the whole site in html and then convert it to PHP</li>
</ol>

<p>Really need suggestions, and I know that this is the best place to get it.</p>
]]></description>
   </item>
   <item>
      <title>how to insert config.php data from install.php</title>
      <link>http://www.css-tricks.com/forums/discussion/24711/how-to-insert-config-php-data-from-install-php</link>
      <pubDate>Tue, 07 May 2013 12:09:17 -0400</pubDate>
      <dc:creator>amis</dc:creator>
      <guid isPermaLink="false">24711@/forums/discussions</guid>
      <description><![CDATA[<p>I have been built script and make install.php for my script</p>

<p>I want insert data of servername , user , password , database in install.php like installation in wordpres</p>
]]></description>
   </item>
   <item>
      <title>Form Validation</title>
      <link>http://www.css-tricks.com/forums/discussion/24982/form-validation</link>
      <pubDate>Sat, 18 May 2013 17:55:04 -0400</pubDate>
      <dc:creator>LaurelBrittany</dc:creator>
      <guid isPermaLink="false">24982@/forums/discussions</guid>
      <description><![CDATA[<p>I am trying to validate a form and I keep getting an error: Notice: Undefined variable: errorString in C:\xampp\htdocs\introducingphp\email\required_fields\index.php on line 7</p>

<p>The form fields also fill with error text. The form works fine</p>

<pre class="codepen"><code>&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;PHP Form Processing Example&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;?php echo $errorString; ?&gt;

&lt;form action=&quot;process.php&quot; method=&quot;POST&quot;&gt;
  Name:*&lt;br /&gt;&lt;input type=&quot;text&quot; name=&quot;Name&quot; value=&quot;&lt;?php echo $Name; ?&gt;&quot; /&gt;&lt;br /&gt;&lt;br /&gt;
  Email:*&lt;br /&gt;&lt;input type=&quot;text&quot; name=&quot;Email&quot; value=&quot;&lt;?php echo $Email; ?&gt;&quot; /&gt;&lt;br /&gt;&lt;br /&gt;
  URL:*&lt;br /&gt;&lt;input type=&quot;text&quot; name=&quot;URL&quot; value=&quot;&lt;?php echo $URL; ?&gt;&quot; /&gt;&lt;br /&gt;&lt;br /&gt;
  Company:&lt;br /&gt;&lt;input type=&quot;text&quot; name=&quot;Company&quot; value=&quot;&lt;?php echo $Company; ?&gt;&quot; /&gt;&lt;br /&gt;&lt;br /&gt;
  &lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Submit Form&quot; /&gt;
&lt;/form&gt;
  
&lt;/body&gt;
&lt;/html&gt;</code><a rel="nofollow" href="http://codepen.io/chibiwawa/pen/mCtFe">Check out this Pen!</a></pre>



<p>This is the process.php</p>

<pre class="codepen"><code>&lt;?php
/*
 *  Specify the field names that are in the form. This is meant 
 *  for security so that someone can't send whatever they want 
 *  to the form.
 */
$allowedFields = array(
  'Name',
  'Email',
  'URL',
  'Company',
);

// Specify the field names that you want to require...
$requiredFields = array(
  'Name',
  'Email',
  'URL',
);

$errors = array();
foreach($_POST AS $key =&gt; $value)
{
  // first need to make sure this is an allowed field
  if(in_array($key, $allowedFields))
  {
    $$key = $value;
    
    // is this a required field?
    if(in_array($key, $requiredFields) &amp;&amp; $value == '') 
    {
      $errors[] = &quot;The field $key is required.&quot;;
    }
  } 
}

// were there any errors?
if(count($errors) &gt; 0)
{
  $errorString = '&lt;p&gt;There was an error processing the form.&lt;/p&gt;';
  $errorString .= '&lt;ul&gt;';
  foreach($errors as $error)
  {
    $errorString .= &quot;&lt;li&gt;$error&lt;/li&gt;&quot;;
  }
  $errorString .= '&lt;/ul&gt;';
  
  // display the previous form
  include 'index.php';
}
else
{
  // At this point you can send out an email or do whatever you want
  // with the data...
  
  // each allowed form field name is now a php variable that you can access
  
  // display the thank you page
  header(&quot;Location: thanks.html&quot;);
}

</code><a rel="nofollow" href="http://codepen.io/chibiwawa/pen/mCtFe">Check out this Pen!</a></pre>


]]></description>
   </item>
   <item>
      <title>Friendly URL | GET parameters lost</title>
      <link>http://www.css-tricks.com/forums/discussion/24832/friendly-url-get-parameters-lost</link>
      <pubDate>Sun, 12 May 2013 05:55:28 -0400</pubDate>
      <dc:creator>AndrewPham</dc:creator>
      <guid isPermaLink="false">24832@/forums/discussions</guid>
      <description><![CDATA[<p>Let's say I have a website : example.com</p>

<p>And a webpage: example.com/page.php</p>

<p>I want to make it more friendly, so I use .htaccess: example.com/page</p>

<p>Which contains links to other "pages". They are actually the same one, the only difference being the GET parameters from the URL, which would pull different content from the database.</p>

<p>So by clicking the links within "page.php", wether you're on "example.com/page.php" or "example.com/page", you'll get to "example.com/page.php?category=design&amp;page=3&amp;lang=ro"</p>

<p>I want to make it more friendly too, so I use, again, .htaccess. The result would be "example.com/page", followed by all those values, separated by slashes: "example.com/page/design/3/ro"</p>

<p>My question is: Within the page.php file, how on earth am I going to be able to make use of the GET parameters??</p>

<p>$_GET["category"] or $_GET["page"] wouldn't work, at least in my case. Does it work for you? It isn't even logical to work. There is no "category" or "page" parameter in the URL. So when attempting to write $_GET["category"], the server will analize the URL and it will need the actual parameter NAME as well as the VALUE. In our case, we only have the value. Someone, please fill me in?</p>
]]></description>
   </item>
   <item>
      <title>what is wrong in these codes php, sql</title>
      <link>http://www.css-tricks.com/forums/discussion/24933/what-is-wrong-in-these-codes-php-sql</link>
      <pubDate>Thu, 16 May 2013 11:56:57 -0400</pubDate>
      <dc:creator>Rohithzr</dc:creator>
      <guid isPermaLink="false">24933@/forums/discussions</guid>
      <description><![CDATA[<p>index.php</p>

<pre><code>    &lt;div class="pophead"&gt;
&lt;?php 
  include 'connect.php'
  ?&gt;
        &lt;form action="login.php" method="POST"&gt;
            &lt;input type="text" id="txt" class="txt_box" placeholder="ITHC Username or Email" name="user_name"/&gt;
            &lt;input type="password" id="pass" class="pass_box" placeholder="Password" name="user_pass"/&gt;
            &lt;input type="submit" id="button" class="submit" value="LOG IN" /&gt;
            &lt;input type="button" id="cancel" class="cancel" value="CANCEL" onClick="disablePopup()" name="user_pass"/&gt;
        &lt;/form&gt;
    &lt;!--i want to display a error msg here between error--&gt;
    &lt;error&gt;&lt;/error&gt;
    &lt;/div&gt;
</code></pre>

<p>and login.php</p>

<pre><code>&lt;?php
  if(isset($_SESSION['signed_in']) &amp;&amp; $_SESSION['signed_in'] == true)
  {
    ?&gt;
      &lt;script type="text/javascript"&gt;
        alert("You are already signed in, you can &lt;a href='signout.php'&gt;sign out&lt;/a&gt; if you want.");
        history.back();
      &lt;/script&gt;
  &lt;?php
}
else
{
  if($_SERVER['REQUEST_METHOD'] === 'POST')
  {
    $errors = array();
    if(!isset($_POST['user_name'])){
      $errors[] = 'The username field must not be empty.';
    }

    if(!isset($_POST['user_pass'])){
      $errors[] = 'The password field must not be empty.';
    }

    if(!empty($errors)){
      ?&gt;
        &lt;script type="text/javascript"&gt;
                    alert("Uh-oh.. a couple of fields are not filled in correctly..");
                    history.back();
                &lt;/script&gt;
      &lt;?php
    }
  }
    else
    {
      $sql = "SELECT 
            user_id,
            user_name,
            user_level
          FROM
            user
          WHERE
            user_name = '" . mysql_real_escape_string($_POST['user_name']) . "'
          AND
            user_pass = '" . sha1($_POST['user_pass']) . "'";

      $result = mysql_query($sql);
      if(!$result)
      {
        ?&gt;
          &lt;script type="text/javascript"&gt;
                        alert("SQl ERROR TRY AGAIN LATER");
                        history.back();
                    &lt;/script&gt;
                &lt;?php
      }
      else if(mysql_num_rows($result) == 0)
      {
        ?&gt;
          &lt;script type="text/javascript"&gt;
                        alert("wrong user and pass combination");
                        history.back();
                    &lt;/script&gt;
                &lt;?php
      }
      else
      {
        $_SESSION['signed_in'] = true;
        while($row = mysql_fetch_assoc($result))
        {
          $_SESSION['user_id']  = $row['user_id'];
          $_SESSION['user_name']  = $row['user_name'];
          $_SESSION['user_level'] = $row['user_level'];
        }
        ?&gt;
          &lt;script type="text/javascript"&gt;
                        alert("Welcome, ' . $_SESSION['user_name'] . '. &lt;br /&gt;&lt;a href='index.php'&gt;Proceed");
                        history.back();
                    &lt;/script&gt;
                &lt;?php

      }
    }
  }

?&gt;  
</code></pre>
]]></description>
   </item>
   <item>
      <title>Change Status of a Message from Read to Unread</title>
      <link>http://www.css-tricks.com/forums/discussion/24920/change-status-of-a-message-from-read-to-unread</link>
      <pubDate>Wed, 15 May 2013 18:19:55 -0400</pubDate>
      <dc:creator>Hillcrest1674</dc:creator>
      <guid isPermaLink="false">24920@/forums/discussions</guid>
      <description><![CDATA[<p>How do you implement the option to change status of a Message in our admin section from "Read" to "Unread" ? Is that really hard to do ?</p>

<p>We receive messages in our admin section and once a message is read we would like to be able to change the status of the message from "read" back to "Unread".</p>

<p>Is that a rather easy thing to do or complicated ?</p>

<p>Thank you !</p>
]]></description>
   </item>
   <item>
      <title>How to set top margin in layerslider</title>
      <link>http://www.css-tricks.com/forums/discussion/24890/how-to-set-top-margin-in-layerslider</link>
      <pubDate>Tue, 14 May 2013 18:48:07 -0400</pubDate>
      <dc:creator>AAL002626</dc:creator>
      <guid isPermaLink="false">24890@/forums/discussions</guid>
      <description><![CDATA[<p>Hi Friends,</p>

<p>I am not very technical sound in php and coding.</p>

<p>My problem is Whenever i am activating layerslider on homepage its always showing 40-50px below my tabs,  i tried all options and setting's but didn't find any option to set top margin,  so please help me out.</p>

<p>My website is demo.thinkeduventures.com,  its only testing website so please ignore all other errors,  focus only on layerslider,  because i need to implimented on my clients webpage.</p>
]]></description>
   </item>
   <item>
      <title>Wordpress - Permalinks without nested sub-categories</title>
      <link>http://www.css-tricks.com/forums/discussion/3255/wordpress-permalinks-without-nested-sub-categories</link>
      <pubDate>Mon, 06 Jul 2009 04:07:25 -0400</pubDate>
      <dc:creator>itjunge</dc:creator>
      <guid isPermaLink="false">3255@/forums/discussions</guid>
      <description><![CDATA[Hi,<br /><br />I have searched the web for a couple of days but can't find a appropriate answer.<br /><br />I use a Worpdress link structure like this: %category%/%postname% which results in /category/postname<br /><br />But if I have posts in subcategories the Link is like /category/subcategory/postname<br /><br /><b>How can I define that the subcategory will NOT appear in the permalink?</b><br /><br />As I mentioned before, I can't find any advice to this on the web so I ask you for help.]]></description>
   </item>
   <item>
      <title>Simple Contact Form Problems</title>
      <link>http://www.css-tricks.com/forums/discussion/11024/simple-contact-form-problems</link>
      <pubDate>Tue, 01 Mar 2011 14:25:01 -0500</pubDate>
      <dc:creator>rmbrug</dc:creator>
      <guid isPermaLink="false">11024@/forums/discussions</guid>
      <description><![CDATA[Hi. I've never really worked with PHP but I've been trying to use the Nice &amp; Simple Contact Form. It seems like it works but when I hit submit to test it, I never receive the email back. Any ideas as to what's going wrong?<br /><br />My PHP:<br /><pre><code>&lt;?php<br /><br />$EmailFrom = &quot;creamandtwosugars@gmail.com&quot;;<br />$EmailTo = &quot;rmbruggeman@gmail.com&quot;;<br />$Subject = &quot;New Contact Form Response&quot;;<br />$Name = Trim(stripslashes($_POST['Name'])); <br />$Email = Trim(stripslashes($_POST['Email'])); <br />$Message = Trim(stripslashes($_POST['Message'])); <br /><br />// validation<br />$validationOK=true;<br />if (!$validationOK) {<br />  print &quot;&lt;meta http-equiv=\&quot;refresh\&quot; content=\&quot;0;URL=error.htm\&quot;&gt;&quot;;<br />  exit;<br />}<br /><br />// prepare email body text<br />$Body = &quot;&quot;;<br />$Body .= &quot;Name: &quot;;<br />$Body .= $Name;<br />$Body .= &quot;\n&quot;;<br />$Body .= &quot;Email: &quot;;<br />$Body .= $Email;<br />$Body .= &quot;\n&quot;;<br />$Body .= &quot;Message: &quot;;<br />$Body .= $Message;<br />$Body .= &quot;\n&quot;;<br /><br />// send email <br />$success = mail($EmailTo, $Subject, $Body, &quot;From: &lt;$EmailFrom&gt;&quot;);<br /><br />// redirect to success page <br />if ($success){<br />  print &quot;&lt;meta http-equiv=\&quot;refresh\&quot; content=\&quot;0;URL=contactthanks.php\&quot;&gt;&quot;;<br />}<br />else{<br />  print &quot;&lt;meta http-equiv=\&quot;refresh\&quot; content=\&quot;0;URL=error.htm\&quot;&gt;&quot;;<br />}<br />?&gt;</code></pre><br /><br />And the html:<br /><pre><code><br />&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt" target="_blank" rel="nofollow">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt</a>;<br />&lt;html xmlns=&quot;<a href="http://www.w3.org/1999/xhtml&quot;&amp;gt" target="_blank" rel="nofollow">http://www.w3.org/1999/xhtml&quot;&amp;gt</a>;<br />&lt;head&gt;<br />&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/ht	 ml; charset=utf-8&quot; /&gt;<br />&lt;title&gt;Cream &amp; Two Sugars&lt;/title&gt;<br />&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;stylesheet.css&quot; /&gt;<br /><br />&lt;body class=&quot;contact&quot;&gt;<br />        &lt;div id=&quot;container&quot;&gt;<br />            &lt;div id=&quot;wrapper1&quot;&gt;<br />                &lt;hr /&gt;<br />                &lt;div id=&quot;navrow&quot;&gt;<br />                    &lt;ul&gt;<br />                        &lt;li&gt;&lt;a href=&quot;index.html&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;<br />                        &lt;li&gt;&lt;a href=&quot;/portfolio&quot;&gt;Portfolio&lt;/a&gt;&lt;/li&gt;<br />                        &lt;li&gt;&lt;a href=&quot;blog.html&quot;&gt;Blog&lt;/a&gt;&lt;/li&gt;<br />                        &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Contact&lt;/a&gt;&lt;/li&gt;<br />                    &lt;/ul&gt;<br />                    &lt;br /&gt;<br />                &lt;/div&gt;<br />                &lt;div id=&quot;header&quot;&gt;<br />	&lt;h1&gt;Contact&lt;/h1&gt;<br />	&lt;/div&gt;<br />                &lt;div id=&quot;content&quot;&gt;<br />                	&lt;p&gt;Please feel free to contact me via &lt;a href=&quot;mailto:rmbruggeman@gmail.com&quot;&gt;email&lt;/a&gt; or the form below.&lt;/p&gt;<br />    	&lt;div id=&quot;contact-area&quot;&gt;<br />                        &lt;form method=&quot;post&quot; action=&quot;contactengine.php&quot;&gt;<br />                            &lt;label for=&quot;Name&quot;&gt;Name:&lt;/label&gt;<br />                            &lt;input type=&quot;text&quot; name=&quot;Name&quot; id=&quot;Name&quot; /&gt;<br />                <br />                            &lt;label for=&quot;Email&quot;&gt;Email:&lt;/label&gt;<br />                            &lt;input type=&quot;text&quot; name=&quot;Email&quot; id=&quot;Email&quot; /&gt;<br />                            <br />                            &lt;label for=&quot;Message&quot;&gt;Message:&lt;/label&gt;&lt;br /&gt;<br />                            &lt;textarea name=&quot;Message&quot; rows=&quot;20&quot; cols=&quot;20&quot; id=&quot;Message&quot;&gt;&lt;/textarea&gt;<br />                            <br />                            &lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Submit&quot; class=&quot;submit-button&quot; /&gt;<br />                        &lt;/form&gt;        <br />        	&lt;div style=&quot;clear: both;&quot;&gt;&lt;/div&gt;<br />    	&lt;/div&gt;<br />	&lt;/div&gt;<br />            &lt;/div&gt;<br />            &lt;div id=&quot;footer&quot;&gt;<br /><br />            &lt;/div&gt;<br />    &lt;/div&gt;<br />&lt;/body&gt;<br />&lt;/html&gt;<br /></code></pre>	 ]]></description>
   </item>
   <item>
      <title>Facebook tab with form</title>
      <link>http://www.css-tricks.com/forums/discussion/24905/facebook-tab-with-form</link>
      <pubDate>Wed, 15 May 2013 06:23:57 -0400</pubDate>
      <dc:creator>XaviJr</dc:creator>
      <guid isPermaLink="false">24905@/forums/discussions</guid>
      <description><![CDATA[<p>Hi guys. 
I'm trying to set up a newsletter form in a tab of my facebook page and I have all the javascript and php validation ready.</p>

<p>My problem is that my tab code is on a static html app and I don't know how to call the php file/code. I have to host that code in my own server and call it using ajax? But that will not have those same origin policy problems?</p>

<p>Thanks in advance.</p>
]]></description>
   </item>
   <item>
      <title>PHP Fatal error (joomla)</title>
      <link>http://www.css-tricks.com/forums/discussion/24903/php-fatal-error-joomla</link>
      <pubDate>Wed, 15 May 2013 06:13:59 -0400</pubDate>
      <dc:creator>ani7ruddha</dc:creator>
      <guid isPermaLink="false">24903@/forums/discussions</guid>
      <description><![CDATA[<p>PHP Fatal error:  Call to undefined method stdClass:onDisplay() in libraries\joomla\html\editor.php on line 459</p>

<p><a href="http://techcongress.net/" target="_blank" rel="nofollow">http://techcongress.net/</a></p>

<p>Plz help asap</p>
]]></description>
   </item>
   <item>
      <title>Detect mobile and redirect</title>
      <link>http://www.css-tricks.com/forums/discussion/13960/detect-mobile-and-redirect</link>
      <pubDate>Mon, 03 Oct 2011 14:20:50 -0400</pubDate>
      <dc:creator>DocRocks</dc:creator>
      <guid isPermaLink="false">13960@/forums/discussions</guid>
      <description><![CDATA[I'm not a php programmer and would like to find a php script to detect visitors who are using mobile phones to my site, and then redirect them to a subdomain on the site optimized for small screens.  Can someone point me to an easy to understand and install script to do that? <br /><br />Thanks]]></description>
   </item>
   </channel>
</rss>