Jump to content

Zane

Administrators
  • Posts

    4,362
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Zane

  1. have you tried taking the numbers out of quotes; treating them like numbers instead of strings? i.e if ($rooms->type==13) { instead of if ($rooms->type=="13") {
  2. Good catch.. I meant to have it as if($i % 3 == 0).. .. fortunately though, that has already been pointed out earlier.
  3. Would have helped a lot more if you had shown us what you already tried.. But here's a code-worthy suggestion. SELECT sum(purchase1, purchase2) as DailySum from TheTable GROUP BY date
  4. you'd be better off with a for loop $content = array( "http://www.somewebsite0.com|imagename0.jpg", "http://www.somewebsite1.com|imagename1.jpg", "http://www.somewebsite2.com|imagename2.jpg", "http://www.somewebsite3.com|imagename3.jpg", "http://www.somewebsite4.com|imagename4.jpg", "http://www.somewebsite5.com|imagename5.jpg" ); shuffle($content); echo '</pre> <table>'; for($i=0; $i{ $printad = explode('|', $content[0]); if($i % 3) echo ""; // This is the key that will give you three columns echo ''; // You only need the above line once } echo '</table>
  5. That's a difficult question to answer given the criteria.... none. PHP is a great language, but to point out its "benefits" compared to nothing at all would be no different than replying to you with a blog about the peacock that lives down the street and all the benefits of living on a street with a peacock on it. If you're just jealous because you can't write the same way as "facebookster" then I'd say PHP has at least one benefit; like making someone jealous and envious for one. It seems to hold this power that makes people want to learn it, know it, ask people to learn it, pay them to "make it", etc.. That's just how cool PHP is.
  6. You can very easily hover over the Profile link in the navigation menu > Click Summary and choose between seeing All Posts or All Topics. and Stats I'll even provide a mini-tutorial to show you how simple it is. [attachment deleted by admin]
  7. Your dad the plumber is literally going down the gutter; so you decided to make him a website. Before I clicked on the link to the website I was expecting to at least see one piece of PVC pipe somewhere on the page, perhaps a toilet, maybe even Mario and Luigi. Instead.. I'm shown this "creative" display of pipe cutters (that when reduced to a favicon, looks like a marijuana leaf) above .... a bunch of words. What did the words say? I don't know.. they weren't displayed in such a way that seemed important, but I do know you dad is perfectly capable of arranging pipe cutters. Yes. I think it would be better if the whole thing was a slideshow.. honestly. I hope I was able to provide some insight...even if I didn't have anything positive to say.
  8. I suppose you want to know how to edit the Registry with PHP too? Change the operating system? Attach arms and legs.. make it walk; make it work at McDonald's at minimum wage for you? What are you expecting out of PHP?
  9. could you not just set the div's margin to margin: 50% auto;
  10. Yeah, because if you signed anything like an NDA.. then I'd say you'll have no luck putting a copyright to your stuff seeing as how it's not yours anymore. If you sign the NDA, then your employer pretty much owns whatever you make (at work)
  11. it's obviously something in your script trying to access something. I don't know why it times out after 6-10 times, but I would install Firebug for Firefox and check the page loading stats
  12. Zane

    Linux Evaluation

    Usually, you already know exactly why you want linux. And even more usual of an answer..is ... more control.
  13. Put the copyright in the code itself... as a comment You could also put in the footer that the page/site was designed/developed by .... along with your employer's copyright.
  14. variables can't begin with a number for one. and secondly... try this $if100 = ($rows['views'] > 100) ? "Greater than 100" : "Not greater than 100";
  15. http://en.wikipedia.org/wiki/Blue_Screen_of_Death
  16. That probably has a lot to do with it..
  17. foreach($_POST["selectedstaff"] as $staff_id) { } Given the very little information... I can only assume that $_POST['selectedstaff'] has only one key..
  18. sounds like you have the onclick placed in the wrong element.. try putting it in the inner span. Looking at your code.. You've got Button SPAN------ | |---Name of Button SPAN |---Arrow Character SPAN You've got the onclick set for the parent and not the text or arrow.
  19. The @ symbol supresses errors. It keeps your script from halting if say.... $rs_pages wasn't "a valid MySQL result resource" which is a very very common error. It usually occurs when an SQL statement has a typo in it.. so to speak. The symbol is good for debugging ... if you didn't care whether or not that line failed or not.
  20. I couldn't figure out why you were getting an invalid offset.. for multiple numbers.. so I used my boredom and wrote this out... $file = file_get_contents("tableinput.txt"); $lines = explode ("\r\n", $file); //break the input into individual lines //we assume file was written on Windows machine (can easily change \r\n to simply \r for Linux) $rowCount = 0; foreach ($lines as $line) { if(!$rowCount) $columns[] = explode ("\t", $line); else { $data[] = explode("\t", $line); $columns[$rowCount][] = $data[$rowCount]; } $rowCount = ($rowCount } echo "", print_r($columns), ""; ?>
  21. Bummer... figured the comma would do it. Guess you'll have to do this $message = "</pre> <table> Your Name".$_POST['name']." Contact No".$_POST['telephone']." E-Mail".$_POST['email']." </table> <br> <table> Which Sipfit Products are you interested in?: "; for($i = 0; $i $message .= "". $_POST["product_int"][$i] . "\n"; } $message .= " </table>
  22. Ok then. Try changing this for($j = 1; $j to this [code] for($j = 1; $j
  23. if you use a comma instead of a period your code will work. >" , for($i = 0; $i". $_POST["product_int"][$i] . ""} , " At least I'm pretty sure it will.
  24. using the PHP function file... you can eliminate your "explode by \r\n" method.. seeing as how file() will produce an array of every line... at which point you can use a foreach loop Once you do that... you can set the first loop to set your variables.. exploding by \t like you're already doing... and then for every loop afterwards you can assign to each respective variable.
  25. This doesn't make much sense. You'll have to show more code than that if you want some quality help.
×
×
  • 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.