-
Posts
234 -
Joined
-
Last visited
-
Days Won
10
Sepodati last won the day on October 30 2017
Sepodati had the most liked content!
Profile Information
-
Gender
Male
-
Location
Caro, MI
Recent Profile Visitors
1,625 profile views
Sepodati's Achievements
-
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.
- 1 reply
-
- 1
-
-
Why program a back button when the browser already has one, though?
-
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.
-
Never trust the data you are given, the user is irrelevant.
-
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); }
-
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.
-
select dropdown value keeps changing on edit
Sepodati replied to ianhaney's topic in PHP Coding Help
<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? -
Pages that use GET for their content on Google and other search engines
Sepodati replied to slj90's topic in PHP Coding Help
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. -
http://php.net/manual/en/function.file.php
-
This sounds like a classic "help me solve my solution" rather than "help me solve my problem"...
-
There is no errors but data from database doesn't show on the site
Sepodati replied to alinash33's topic in MySQL Help
SELECT * FROM categories WHERE parent='parent_id' You don't see an issue with that? -
Write a PHP script that scrapes the web, looking for complex problems to solve.
-
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" } }
-
$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.
-
You have to do it in two steps, then, or involve JavaScript.