Jump to content

CroNiX

Staff Alumni
  • Posts

    1,469
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by CroNiX

  1. Maybe this? <?php $exip = explode('.',$ip); $newIP=$exip[0].'.'.$exip[1].'.'; $oDB->Select('ip_tracking','ip',"WHERE ip LIKE '$newIP%'");
  2. Please post your code within code tags. Its the '#' icon in the editor and start your code with <?php so it will get formatted and colorized properly.
  3. Either way...actually I just tested it. I was in AI and just saved for web and devices as a gif with transparency. It actually turned out really well I didn't even consider gif. Then I just put it in a div and set the background color to various colors. The gif turned out to be 4.5k in size and used 17 colors (16 + transparent).
  4. The best I can think of is to save that shirt image as png and make everything that is white in that pic transparent 100% so that all you have is the outline of the shirt. Then have a div with your specified color background and put the png on top of it.
  5. Encapsulated PostScript Photoshop and higher end graphic apps can open it
  6. I think this line: <?php $activePage = ($_SERVER["QUERY_STRING"] == 'webpages_id='.$item['webpages_id']) ? '-active' : ''; should be this: <?php $activePage = ($_POST['webpages_id'] == $item['webpages_id']) ? '-active' : ''; or $_GET, whichever you are using
  7. although this: <?php $options = generateOptions($_POST['txtCountry']); should be changed to this: <?php $selOption = isset($_POST['txtCountry']) ? $_POST['txtCountry'] : ""; $options = generateOptions($selOption); in case it hasn't been submitted yet
  8. something like this should work: <?php $options = generateOptions($_POST['txtCountry']); $content .= '<tr><td>Full Name</td><td><input name="Name" type="text" value="'.$_POST['Name'].'" size="32" maxlength="32" class="text" /></td></tr>'; $content .= '<tr><td>Telephone</td><td><input name="Telephone" type="text" value="'.$_POST['Telephone'].'" size="32" maxlength="32" class="text" /></td></tr>'; $content .= '<tr><td>Email Address</td><td><input name="Email" type="text" value="'.$_POST['Email'].'" size="32" maxlength="50" class="text" /></td></tr>'; $content .= '<tr><td>County</td><td<SELECT NAME="txtCounty" SIZE="1">'; $content .= $options; $content .= '</SELECT></td></tr>'; function generateOptions($curSelect) { $opts=array( 'Please select your country', 'Aberdeenshire', 'Angus', 'Argyll', 'Avon' ); $options=""; foreach($opts as $name) { $sel = ($name == $curSelect) ? ' selected="selected"' : ""; $options .= "<OPTION VALUE=\"$name\"$sel>$name</OPTION>\n"; } return $options; }
  9. There is probably an easier way, but this will work: <?php $tdate=trim($result[subIFD][DateTimeOriginal]); $splitRaw=split(" ", $tdate); $splitDate = split(":", $splitRaw[0]); $newRawDate = mktime(0,0,0,$splitDate[1],$splitDate[2],$splitDate[0]); $newDate = date("j M. Y", $newRawDate); //lookup date() to see other formatting options here echo $newDate;
  10. Its working now? Great! You really need to turn on error reporting. It would have told you some of these errors...like the missing braces...Very hard to debug with no error reporting... Of course, only enable error reporting during coding time, not for production
  11. Do you have error reporting turned on? Also, you are still missing your closing curly brace on your foreach loop...add one more just below: $page['content'] .= "<li><a href=\"subcategory.php?sCatID=$subcatID\">$bold_value</a></li>\n";
  12. replace echo $page['content']; with echo "<pre>"; print_r($page); echo "</pre>"; and post the output.
  13. add: echo $page['content']; just above your print_page() function.
  14. oops, I don't think that last line should be in the braces. It should be just below the closing brace.
  15. <?php foreach($category['Subcats'] as $subcatID => $subcatName){ $bold_value = in_array($subcatID, $bolded_ids) ? "<strong>$subcatName (TOP 20)</strong>" : $subcatName; $page['content'] .= "<li><a href=\"subcategory.php?sCatID=$subcatID\">$bold_value</a></li>\n"; $page['content'] .= "</ul>\n"; }
  16. and what does your print_page() function look like?
  17. You don't have curly braces {} around your foreach statement: foreach(blah as blah){ ... ... }
  18. Please repost your code with all of your changes. Use the code tags and start with <?php so it will format/highlight the code.
  19. no, its not the issue. The issue is it can't find that file where you are telling it via the include statement.
  20. You can using the apc extension with php 5.2+. http://www.ibm.com/developerworks/library/os-php-v525/index.html
  21. Thats the default include path setting set by the php.ini. If php can't find file where you tell it in your include statement, it looks in the default include path for the file.
  22. Are you passing a parameter in the url for each different page? Like http://mysite.com/index.php?page=admin.php http://mysite.com/index.php?page=usercontrol.php etc? How are you accessing the different pages?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.