Jump to content

Sepodati

Members
  • Content count

    234
  • Joined

  • Last visited

  • Days Won

    10

Sepodati last won the day on October 30 2017

Sepodati had the most liked content!

Community Reputation

32 Good

About Sepodati

  • Rank
    Advanced Member

Profile Information

  • Gender
    Male
  • Location
    Caro, MI

Recent Profile Visitors

354 profile views
  1. The question is more about you than the breeds. What kind of living situation do you have? Apartment or room to run? Kids? Will the dog be left alone while you're at work? What kind of climate do you live in? etc... Not saying you need to answer all of that, here, but consider what you bring to the table for the dog, rather than just the breed / style you want.
  2. Sepodati

    Go back to search result

    Why program a back button when the browser already has one, though?
  3. Sepodati

    Go back to search result

    You have to remember or pass $industry and $position back to Search-Result.php. Keeping them in a session may work. If they are passed as a part of a form, prefer those values, but otherwise look in a session for "previous" values of the two search terms.
  4. Sepodati

    Escaping the @ sign

    Never trust the data you are given, the user is irrelevant.
  5. Sepodati

    Unidentified Error

    You need to learn that when dealing with forms, there are two actions that take place. The first action is to display your form and the second action is to process the form once it's submitted. You're blending these actions in the same file (which is okay), but the form creation and form processing are being handled all within each other and it's confusing. $sname_array is only set when you're processing the form, not before. Because it's only defined in a block of code that's run when a $_POST variable is present. Structure your code so that it's clear when the form is being processed versus when it's being displayed. if(isset($_POST['submit'])) { //process form } else { //display form } Also, I don't think these lines are doing what you think they're doing... while ($sline = fgets ($sfile)) { $name = explode (',', $sline); }
  6. Sepodati

    do-while not working as it should..

    Your logic is flawed. The loop will only continue if the conditions evaluate to true. $headcount is not equal to 2 and $loopcount is not equal to 5, so the condition fails and the loop exists after the first go. What I think you want is the loop to continue while $headcount is less than 2 or $loopcount is less than 5.
  7. Sepodati

    select dropdown value keeps changing on edit

    <strong>Repair Status:</strong> <select name="status"> <option value="In Queue">In Queue</option> <option value="Working on">Working on</option> <option value="Awaiting Parts">Awaiting Parts</option> <option value="Ready for Collection/Delivery">Ready for Collection/Delivery</option> <option value="Complete">Complete</option> <option value="Unable To Repair">Unable To Repair</option> </select> Where exactly are you applying any PHP logic to set the option value?
  8. Well, yes and no. Google will have no idea that domain.com/index.php?id=45678 exists with unique content separate from just index.php. Unless it encounters a link to that page, then it'll follow it and index it. Unless I'm totally mistaken by how things are done nowadays, Google isn't going to guess at query string values to find pages, but it will follow links it encounters.
  9. Sepodati

    reading and performing action

    http://php.net/manual/en/function.file.php
  10. Sepodati

    Array manipulation

    This sounds like a classic "help me solve my solution" rather than "help me solve my problem"...
  11. SELECT * FROM categories WHERE parent='parent_id' You don't see an issue with that?
  12. Sepodati

    complex php project

    Write a PHP script that scrapes the web, looking for complex problems to solve.
  13. Sepodati

    Storing array values from form

    I still think this is a naming issue with being able to relate a checkbox to a text box. Consider this. I created a form that asks for a Name, Age and has a checkbox on whether that person should be validated. I supplied four names, four ages and clicked validate on two of the names. With the below dump of the $_POST data, can you tell me what two names I checked? array(3) { ["name"]=> array(4) { [0]=> string(4) "John" [1]=> string(5) "Roger" [2]=> string(7) "Rebecca" [3]=> string(5) "Bobby" } ["age"]=> array(4) { [0]=> string(2) "29" [1]=> string(2) "33" [2]=> string(2) "65" [3]=> string(2) "12" } ["validate"]=> array(2) { [0]=> string(3) "Yes" [1]=> string(3) "Yes" } }Hint, it wasn't John and Roger. Now... consider this method. Instead of just naming the form elements name[], age[] and validate[], I instead use the following code: for($i = 0; $i < 4; $i++) { ?> <p>Person #<?=$i?></p> <p>Enter Name: <input type="text" name="name[<?=$i?>]" value="" /></p> <p>Enter Age: <input type="text" name="age[<?=$i?>]" value="" /></p> <p>Validate: <input type="checkbox" name="validate[<?=$i?>]" value="Yes" /></p> <hr> <?php }Now that produces a form like this: <p>Person #0</p> <p>Enter Name: <input type="text" name="name[0]" value="" /></p> <p>Enter Age: <input type="text" name="age[0]" value="" /></p> <p>Validate: <input type="checkbox" name="validate[0]" value="Yes" /></p>Where $i keeps getting put in the [] for each element. So I have name[0], name[1], name[2] and name[3], along with the same for age[] and validate[]. Now when I submit the form with the same data and same boxes checked as before, can you tell which two names I checked to validate? array(3) { ["name"]=> array(4) { [0]=> string(4) "John" [1]=> string(5) "Roger" [2]=> string(7) "Rebecca" [3]=> string(5) "Bobby" } ["age"]=> array(4) { [0]=> string(2) "29" [1]=> string(2) "33" [2]=> string(2) "65" [3]=> string(2) "12" } ["validate"]=> array(2) { [0]=> string(3) "Yes" [2]=> string(3) "Yes" } }
  14. Sepodati

    Storing array values from form

    $together['p_order'] doesn't make any sense, notwithstanding that there's no p_order element in your form, as mentioned. Can you post a var_dump() of $_REQUEST once you've submitted this form, with some boxes checked and others not checked? An actual copy/paste of the generated HTML form would be helpful, too.
  15. Sepodati

    Create a Hash using a variable

    You have to do it in two steps, then, or involve JavaScript.
×

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.