Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Moloney

  1. Moloney

    Angular Js

    I have only took a glance at it at this stage. I think I will learn laravel first and then move on and try the AngularJs way of doing things. It's hard to know without building an app of some sort.
  2. Moloney

    Angular Js

    Wondering if anyone here had tried out AngularJs and had any opinion on it? Seems to be gaining traction.
  3. And there are other frameworks worth looking at too like Zurb Foundation....
  4. Moloney

    Php Construct

    Thanks Ben. The second post was useful.
  5. Moloney

    Php Construct

    Hi, I have a question also related to constructors in PHP. I studied some JAVA for 3 months and now I am starting to learn some c#. I noticed that in these languages, we can overload the constructor. Then, recently I went back to PHP to do some web development and I noticed I couldn't find a way to overload the constructor. I was just wondering what you do in PHP if you wanted to overload a constructor?
  6. Hi Ben, Just curious if clients are always good about providing sufficient content or do web designers often end up as content writers too?
  7. Moloney

    Html 5

    I have used <br> without problems.
  8. Moloney

    Php Search Mysql

    Firstly, I'm no expert, just learning as well myself so maybe somebody else can add in here. Secondly, I think users normally don't know their id so usually it is not a good search tool. If you already know the id, then no search is needed. Thirdly, a search for first name alone and even first name and last name is not all that specific -- you could have more than one user with the same name. But you could make a form for the entry of the name you want to search. This is the general gist of it, I'm probably missing a good few things here so you will need to fill it out with validation and all that stuff: So something like: <form method="POST" action=""> <input type="text" name="search_firstname" value=""> <input type="text" name="search_lastname" value=""> <input type="submit" name="submit" value="search"> </form> // further down then, you could run a query to the database to find the details for that name. if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) { // I haven't time to add validation, you will need to do that yourself. $firstname = $_POST['search_firstname']; $lastname = $_POST['search_firstname']; $q ="SELECT * FROM rcrentals WHERE firstname = '$firstname' AND lastname = '$lastname' "; $r = @mysqli_query ($link_to_database, $q); $data = mysqli_fetch_all($r); echo ' <p> My search reveals that you live in' . $data[0]['city'] . '</p>'; }
  9. I would agree with Andrea --> the context (ie surrounding HTML & css) is important. I'm not even sure what the question is but maybe something like this will work or you: <style> .float { float: left; padding:5px; } .clear { clear:both; /* or just clear left */ } fieldset { width:450px; text-align:center; padding:5px; } input[type="submit"] { margin: 2% auto; padding:5px; } </style> <div> <form> <fieldset> <div> <span class="float"> <label for="label1">Label 1:</label> <input type="text" name="label1" value="label1"> </span> <span class="float"> <label for="label2">Label 2:</label> <input type="text" name="label2" value="label2"> </span> </div> <div class="clear"> <span class="float"> <label for="label3">Label 3:</label> <input type="text" name="label3" value="label3"> </span> <span class="float"> <label for="label4">Label 4:</label> <input type="text" name="label4" value="label4"> </span> </div> <div class="clear"> <span class="float"> <label for="label5">Label 5:</label> <input type="text" name="label5" value="label5"> </span> <span class="float"> <label for="label6">Label 6:</label> <input type="text" name="label6" value="label6"> </span> </div> <div class="clear"> <input type="submit" value="Submit Button"> </div> </fieldset> </form> </div> </div>
  10. I came across this before, looks nice & simple; http://palettebuilder.com/default.aspx
  11. I tried this to see what would happen. Whenever I entered source code from firefox between the code snippet tags, I got a strange output like the others. Then I copied and pasted the same code to notepad & 3 different IDES and I got a good result --> normal code snippet. So I just seem to have an issue with the source code that comes directly from firefox without being "cleansed" first in an IDE or notepad (in my case). If that helps at all........
  12. Okay, thanks for all your explanations. Cheers,
  13. So, say I created an e-commerce store for somebody & they had no external online links to their site (because it is brand new), googlebot would not be able to find them? Great answer, cheers:clap:
  14. Thanks, this seems like a prudent step.
  15. Hi Eddie, Thnx for the reply. Are you saying that crawlers, etc cannot access these folders either? [because I wasn't really sure about this] Thnx
  16. Sorry, to understand better, by crawling the web --> does this mean look for index.html or index.php in all root directories of all registered domain names? Also, what about registered sub-domain names, where do they fit in in all of this?
  17. Hi Eddie, Do you know in what instances the temp url might be indexed? Like for example if it was called index.html inside of a folder, could it potentially be indexed? Would a password protected folder be more useful in preventing indexing by search engines? How does the robot.txt solution work? Thnx
  18. Is there any SEO consequences to hiding the stacked absolute section? Personally I like this method of introducing new content because the page doesn't need to refresh but I always wondered if there is an SEO consequence. I think this site is a good example. Anybody have experience of this? [ I've seen google's own videos on all that stuff -- difficult to get a clear cut answer]
  19. okay. thanks for trying. I might join stackoverflow and see. Anyways, I'd say I'll look into it again, post it there & post back here sometime in the future if I get some sort of answer.
  20. Any ideas? It is an abstract question but there must be something in MySQL I don't get.
  21. Hi, I am just wondering why CEILING(10*RAND()) is giving more than one value sometimes and no values at other times when it is combined with the WHERE clause. On the other hand, if it is just used with SELECT CEILING(10*RAND()); it consistently yields only one value between one and ten. I've copied an image below with some MySQL executions to better illustrate what I mean. Any ideas why this is? [please tell me if this question is not clear] Why do I have to limit the query to 1 --> should it not be only one value returned anyways?
  22. did you echo the $message? echo $message; ???
  23. i FIGURED MORE THAN ONE WAY TO MAKE IT WORK. AND I UNDERSTAND NOW WHAT YOU MEAN BY LOGIC. DOES THIS SAME LOGIC WITH IF ELSE STATEMENTS APPLY IN OTHER PROGRAMMING LANGUAGES LIKE JAVASCRIPT? FIRST ONE WAS TO SIMPLY REARRANGE THE ORDER OF THE IF, & IFELSE; if ($name == "Company Name"){ echo "<p> Sorry, the form has not been submitted. A <b>valid</b> Company name has not been submitted</p>"; } elseif (!EMPTY($name)) { $condition2 = TRUE; } elseif (!EMPTY($name) == FALSE) { echo "<p> Sorry, the form has not been submitted. A Company name has not been submitted</p>"; } SECOND ONE WAS TO ADD ANOTHER IF STATEMENT; if (!EMPTY($name)) { $condition2 = TRUE; } elseif (!EMPTY($name) == FALSE) { echo "<p> Sorry, the form has not been submitted. A Company name has not been submitted</p>"; } if ($condition2==TRUE && $name=="Company Name") { echo "<p> Sorry, the form has not been submitted. A <b>valid</b> Company name has not been submitted</p>"; } THANKS AGAIN
  • Create New...