Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. Why do you think that? If you just said it works... did you actually try it?
  2. 7-10 years experience with AJAX? Why don't you people do any research BEFORE creating a job posting?
  3. Jessica

    SELECT

    Also check the source of the page in your browser and make sure there is nothing weird being output there that would break it.
  4. Jessica

    SELECT

    Put the process parameter as a hidden input, and check for $_POST['process'];, not $process.
  5. Jessica

    SELECT

    Is that all I said to do? Weird, I'm sure I wrote more....
  6. Look at example 2 http://us.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc And curly syntax http://us.php.net/manual/en/language.types.string.php#language.types.string.parsing
  7. Jessica

    SELECT

    You need to surround the value in double quotes, it's <option value="1">1</option> etc. On the form handler, do print_r($_POST);
  8. For the first one I literally gave you the code, what is confusing about it? For the second, there is nothing with an index of search in that code. The second error tells you $_POST['category'] is not an array. You have to adapt the code I wrote.
  9. 1. He understands just fine. Look at the responses. 2. Based on his posts and your posts, I think you are the one who doesn't speak or understand English very well. I mean that as purely observational, not an insult. Also, most people aren't going to know what you mean by EN so write the whole word.
  10. WHY DIDN'T YOU TRY DOING THIS? I smell a troll at this point.
  11. Finally got a chance to come back to this project, Barand the code works perfectly. Thanks again.
  12. $url[0] = "\\tinyPHP\\Classes\\Controllers\\".$url[0]; $controller = new $url[0]; $controller->loadModel($url[0]); You see WHY this is happening, right? $loadController = "\\tinyPHP\\Classes\\Controllers\\".$url[0]; $name = $url[0]; $controller = new $loadController; $controller->loadModel($name);
  13. Not sure why you made everything bold now. Just add a blank option right after starting the select. <select name="category" id="category"> <option> </option> For this problem, you need to create your query as a string, only adding the fields which are not empty. You can do it like this, where your posted fields have the name "search[]". You would use prepared statements to avoid SQL injection. I seriously suggest stop using Dreamweaver. $query = "SELECT field FROM table"; $whereClauses = array(); $whereValues = array(); foreach($_POST['search'] AS $name=>$s){ $s = trim($s); if(strlen($s)){ $whereClauses[] = "`$name` = ?"; $whereValues[] = $s; } } if(count($whereClauses)){ $query .= " WHERE ".join(" OR ", $whereClauses); } //Now your query is $query and your arguments for the prepared statement are $whereValues;
  14. This is why you need to ask clear questions. In your original post you said it was PHP code, which it's not, it's HTML/Javascript, and it's on a .tpl! If you had said from the beginning it was on a tpl (I assume it's Smarty, but I don't know if any other engines use .tpl) this thread would be much shorter.
  15. If it's a .tpl you likely need to wrap that section in {literal} tags or whatever is the equivalent for your template engine.
  16. Here's how an 8 team bracket looks to me, this is without any formatting. <?php $teams = 8; $levels = 1; $numTeams = 2; $matches = array(); do{ $matches[$levels] = $numTeams; $numTeams *= 2; $levels++; } while($numTeams <= $teams); $matches = array_reverse($matches); echo '<table> <tr>'; foreach($matches AS $level=>$numMatches){ echo '<td>'; for($i=1; $i<=$numMatches; $i++){ echo 'Team A vs Team B<br>'; } echo '<td>'; } echo '</tr> </table>'; ?>
  17. In your examples, I think you have the brackets set up incorrectly anyway. Look at these images and compare them to your pictures. They don't look right. https://www.google.com/search?q=16+team+bracket&hl=en&prmd=imvns&tbm=isch&tbo=u&source=univ&sa=X&ei=-_AXUM-RA4q68AH06IGgCA&ved=0CFcQsAQ&biw=1280&bih=655 https://www.google.com/search?q=8+team+bracket&hl=en&prmd=imvns&tbm=isch&tbo=u&source=univ&sa=X&ei=-_AXUM-RA4q68AH06IGgCA&ved=0CFcQsAQ&biw=1280&bih=655
  18. Use code tags, and that's wayy to much code for us to go through and find a problem. Narrow it down to the code that has the problem.
  19. This is in a PHP file? Did you END the ?> php tag?? Do you have error reporting on and set to E_ALL?
  20. You would need to use loops. Beyond that, it's just a matter of echoing the HTML. Have you tried any code yet?
  21. Look at the example on the page and make your code look EXACTLY like it but with your own query.
×
×
  • 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.