-
Posts
1,469 -
Joined
-
Last visited
-
Days Won
12
Everything posted by CroNiX
-
Maybe this? <?php $exip = explode('.',$ip); $newIP=$exip[0].'.'.$exip[1].'.'; $oDB->Select('ip_tracking','ip',"WHERE ip LIKE '$newIP%'");
-
so you want it to find 221.134.* ?
-
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.
-
cool
-
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).
-
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.
-
Encapsulated PostScript Photoshop and higher end graphic apps can open it
-
How to highlight correct menu tab when viewing SUBPAGES
CroNiX replied to JsusSalv's topic in PHP Coding Help
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 -
[SOLVED] Select Box and PHP - Can this be done?
CroNiX replied to Bricktop's topic in PHP Coding Help
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 -
[SOLVED] Select Box and PHP - Can this be done?
CroNiX replied to Bricktop's topic in PHP Coding Help
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; } -
How to highlight correct menu tab when viewing SUBPAGES
CroNiX replied to JsusSalv's topic in PHP Coding Help
post the code for generating your menu -
[SOLVED] formatting EXIF date (just one line of code) - help please
CroNiX replied to anon36's topic in PHP Coding Help
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; -
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
-
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";
-
replace echo $page['content']; with echo "<pre>"; print_r($page); echo "</pre>"; and post the output.
-
add: echo $page['content']; just above your print_page() function.
-
oops, I don't think that last line should be in the braces. It should be just below the closing brace.
-
<?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"; }
-
and what does your print_page() function look like?
-
You don't have curly braces {} around your foreach statement: foreach(blah as blah){ ... ... }
-
Please repost your code with all of your changes. Use the code tags and start with <?php so it will format/highlight the code.
-
no, its not the issue. The issue is it can't find that file where you are telling it via the include statement.
-
You can using the apc extension with php 5.2+. http://www.ibm.com/developerworks/library/os-php-v525/index.html
-
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.
-
How to highlight correct menu tab when viewing SUBPAGES
CroNiX replied to JsusSalv's topic in PHP Coding Help
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?