ToonMariner
Members-
Posts
3,342 -
Joined
-
Last visited
Everything posted by ToonMariner
-
you have padding on the div - this gets added to the width of the box. width does not mean width of a container it means the width of the content of that container - while the box model is well established this is one where I think MS used to more intuitive method (the wrong one that is).
-
use the vartical-align property nd give your div a height.
-
the border on the related links means that it will be wider than 20% try this... <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link href="css.css" rel="stylesheet" type="text/css" /> <title>Welcome!</title> </head> <body> <div id="main_body"> <div id="header"></div> <div id="related_links"> <ul> <li><a href="#">Link 1</a></li> <li><a href="#">Link 2</a></li> </ul> </div> <div id="text_house"> Hello, it is I, Mr. Frustrated. </div> </div> </body> </html> #main_body { background-color: #ffffff; width: 80%; margin-top: 0px; margin-left: auto; margin-right: auto; margin-bottom: 0px; padding: 0px; } #header { background-color: #009900; width: 100%; height: 80px; margin-top: 0px; margin-left: auto; margin-right: auto; margin-bottom: 0px; } #text_house , #related_links { margin: 0 0 5px 5px; border: 1px solid #000; } #text_house { background-color: #99ffff; } #related_links { background-color: #996600; float: right; width: 20%; }
-
make them radio buttons (with the same name)...
-
As you set the value of $email that goes into the query then simply do not set it to the email you wish to be ignored by the query. If this is a user entering an email address to check if its listed then $results = $aQuery -> query("SELECT * FROM affiliates WHERE email = '$Email' AND email != 'xx@xx.xom'"); Will ensure that no results are returned... Or you could save yourself a query and do this.. if (strcasecmp('xx@xx.com', $email) == 0) { echo "NO RESULTS"; } else { $results = $aQuery -> query("SELECT * FROM affiliates WHERE email = '$Email'"); $duplicatex = mysql_num_rows($results); $duplicatexArray = mysql_fetch_array($results); $atsign = substr_count($Email, '@'); if($duplicatex > 1) die("ERROR, MORE THAN 1 EMAIL HAS BEEN DETECTED. PLEASE REPORT TO ADMIN."); }
-
validator suggests you have some paragrpah tag in the mix...
-
export it as an sql file - if the size is too big export portions of you database into separate sql files...
-
[SOLVED] file_get_contents - issues with remote files
ToonMariner replied to gregsmith's topic in PHP Coding Help
Make sure you are running php4.3 or higher (file_get contents is not supported prior to that). Also amke sure that the file is being made avialable to you - the other server may block requests for it based on how you try to retrieve that file... -
Howto stop long Url wrapping in email at 989 chars?
ToonMariner replied to ryel01's topic in PHP Coding Help
make it shorter -
OK OK I am missing something fundamental here.... I need to create an array within a recursive function and then pass it all back to the main script... here is what I have <?php function grabItems ( $seid , $url ) { global $psarr, $seccont; $tra = &$seccont; $nextlevel = array_keys($psarr['parent'],$seid); foreach ($nextlevel as $key => $val) { if ( array_keys($psarr['parent'],$psarr['section_id'][$val]) ) { grabItems ( $psarr['section_id'][$val] , $url . '/' . convText2Url($psarr['title'][$val]) ); } else { array_push($tra['id'], $psarr['section_id'][$val]); array_push($tra['url'], $url . '/' . convText2Url($psarr['title'][$val])); } } } $seccont = array(); grabItems ( $psarr['section_id'][$psval] , '/portfolio/' . convText2Url($psarr['title'][$psval]) ); ?> Any subsequent reference to $seccont returns an empty array... What the heck am missing?
-
This depends on your OS - *nix uses \n (I think) Windows uses \r\n
-
You can output headers where ever you like if you use ob_start and ob_end_flush. I used to reserve these for building my cms's as not so many would be in the cms for long periods so I thought it would not matter about server load and runtime etc. I read an article recently that suggest that if you have lots of output statements all over (echo, print_r etc.) using the output buffer can actually reduce the processing time of the script significantly. I did a little benchmarking and my results agreed - even on a fairly small script that didn't do too much...
-
This should go in the freelance section and you should spec up your requirements. By that you need to come up with some inof on how the site should work, what kind of navigation, what data to display etc.
-
£30,000 or around £15 per hour.
-
you should not have 2 elements with the same id in one page of html... use class instead. <style type="text/css"> <!-- .contentbox { background: #E5E5E5; padding: 5px; width: 500px; height: 340px; overflow: auto; } --> </style> echo "<div class=\"contentbox\">\n"; echo "hello"; echo "</div>\n"; echo "<div class=\"contentbox\">\n"; echo "hello"; echo "</div>\n";
-
onload="MyJSScrollerHandler.initByClassName('scrollable'); preloadImages();" if you are using the preloader for roll over images then can I suggest you look at using images as background and either switching or shifting the image position using the :pseudo class in css.
-
how do i style the browse button on a form input type="file"?
ToonMariner replied to offsprg01's topic in HTML Help
Brilliant site - bookmarked that one - cheers Andy -
why does your auditor want you to switch to php5? Surely the latest release of 4 will do - simply inform those who have sites on the server that you will be switching to php in 2 months so they have plenty of time to make the switch...
-
Need direction for starting another php process
ToonMariner replied to tnndotnet's topic in PHP Coding Help
cron job is the answer to that one matey OR forking your script (search 'forking' in the tutorials on this site). -
This is more efficient... (you had it from the off btw) <?php <?php $sql = "INSERT INTO mytable ( `id` , `number` , `number_two` , `field2` , `field1` ) VALUES"; for($i=1; $i<=49; $i++){ $sql .= " (NULL , '$i', '1', '', ''),"; } $sql = substr($sql,0,-1); mysql_query($sql) or die (mysql_error()); ?> Only run one query there which should be A LOT faster.
-
Simple if statement is giving me fits ... noobie
ToonMariner replied to ShopMAster's topic in PHP Coding Help
echo row6 and row 1 1st see what they actually are... could use (int)row[6] == (int)row[1] as your comparison -
have a look at simpleXML for php 5 or DOMXML for php 4 (simple is much easier imo).
-
try running it through the browser - sending just one lot of pdf's to you and see if any errors crop up. If that is ok then i suggest you clear any memory cache on each loop so that it doesn't fail next time round...
-
Runner what have you ddone???? I gave you a html file that had everything you needed to do this with the header centered and everything... you seem to have reverted to tables for layouts and using afwul center tags and so and such forth. I know you are learning but learning should be a case of improving your technique NOT making things worse...
-
min-width and max-width in css - support is patchy mind!!!!!