Jump to content

Moloney

Member
  • Posts

    59
  • Joined

  • Last visited

Posts posted by Moloney

  1. 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. 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?

  3. This really depends on the client and what they are expecting, and partially on your usual web design process. My process usually follows something like this:

     

    -- Discussions with the client on the scope of the work, provide them with a proposal, then eventually a signed contract

    -- Discussions with the client on the content that will be included in the site, followed by the design phase, where I present them with design samples and we work together until they are satisfied

    -- After the design phase, I usually move into HTML/CSS/Javascript production of the mockups

    -- In most cases, I take those coded mockups and integrate them into a CMS (usually Wordpress)

    -- Once the main development is complete, I'll receive the content from the client, edit and format as necessary, then enter it into the site

    -- Once the site is ready to go, I'll work with the client to perform any edits and get their final approval, then launch the site

     

    At least in my process, the client usually provides the final content about midway through the project, once the design/development phases are basically complete, and I handle everything else.

     

    Hi Ben,

     

    Just curious if clients are always good about providing sufficient content or do web designers often end up as content writers too?

  4. 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>';
    
    }
    

  5. 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>
    
    

  6. 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........

  7. I think you meant to say internal or inbound links (pointing toward your website). Theoretically yes that could be true, however it is not practical. Many people will find brand new websites for a variety of reasons (they may be hackers, they may be directory sites, they may just like your website and want to link to it).

     

    If you want to be sure the search engines don't index your website, password protect it or at the very least use a robot.txt asking the search engines not to index your website.

     

    Okay, thanks for all your explanations.

    Cheers,

  8. Yes. As long as there is a link to that page (for example: index.html or index.php) googlebot (google's search engine) can find it and index that page.

    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?

     

    Yes. According to Google's own website: If you need to keep confidential content on your server, save it in a password-protected directory. Googlebot and other spiders won't be able to access the content. This is the simplest and most effective way to prevent Googlebot and other spiders from crawling and indexing content on your site.

    Hope that helps. :)

     

    Great answer, cheers:clap:

  9. I forgot to add to my recent post the robots.txt code you can use.

     

    # go away

    User-agent: *

    Disallow: /temp_folder/

     

    You add this to the root. Change temp_folder to whatever you folder name is that you are trying to block.

     

    Google robots.txt and you will find more information on this.

     

    Thanks, this seems like a prudent step.

  10. The password method will probably be the best bet to prevent pages from being indexed by search engines. Keep in mind that you will need to provide the login information to whomever you want to view the temp site.

     

    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

  11. 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?

  12. Either way will work. Just keep in mind that you don't want the search engines to index the temp url. My suggestion is to use a robot.txt file to disallow search engines from indexing the pages.

     

    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

  13. 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]

  14. 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?

     

  15. I have a form with an input field of type="file" name="img1" id="img1".

     

    When the form is submitted, I would like to make sure the user selected a file before my script continues.

     

    I've tried:

     

     

    if(!isset($_POST['img1'])){

    $message="An image file was not selected.";

    }

     

     

    ...but that isn't working.

     

    What am I missing?

     

    did you echo the $message?

     

    echo $message;

     

    ???

  16. 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...