Jessica
Staff Alumni-
Posts
8,968 -
Joined
-
Last visited
-
Days Won
41
Everything posted by Jessica
-
Why do you think that? If you just said it works... did you actually try it?
-
7-10 years experience with AJAX? Why don't you people do any research BEFORE creating a job posting?
-
Also check the source of the page in your browser and make sure there is nothing weird being output there that would break it.
-
Put the process parameter as a hidden input, and check for $_POST['process'];, not $process.
-
Is that all I said to do? Weird, I'm sure I wrote more....
-
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
-
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);
-
Links and images not pointing to correct path
Jessica replied to limitphp's topic in PHP Coding Help
What do you expect when $folder = ""; -
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.
-
Check out Pear HTML_Safe
-
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.
-
WHY DIDN'T YOU TRY DOING THIS? I smell a troll at this point.
-
Finally got a chance to come back to this project, Barand the code works perfectly. Thanks again.
-
Controller Namespace Gets Appended to Model Namespace
Jessica replied to NomadicJosh's topic in PHP Coding Help
$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); -
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;
-
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.
-
If it's a .tpl you likely need to wrap that section in {literal} tags or whatever is the equivalent for your template engine.
-
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>'; ?>
-
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
-
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.
-
This is in a PHP file? Did you END the ?> php tag?? Do you have error reporting on and set to E_ALL?
-
You would need to use loops. Beyond that, it's just a matter of echoing the HTML. Have you tried any code yet?
-
CONGRATS!!!!! and Happy Birthday
-
mysql_result() expects parameter 1 to be resource
Jessica replied to whopunk123's topic in PHP Coding Help
Look at the example on the page and make your code look EXACTLY like it but with your own query.