![](https://forums.phpfreaks.com/uploads/set_resources_1/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
fugix
-
Posts
1,483 -
Joined
-
Last visited
Posts posted by fugix
-
-
you can separate the functions using different classes for each....then call the function in your blocks class like.... classname::MainMenu();
-
so even if it isnt a true alnum it is still directing you to Messages.php?msg=26 ?
-
fist time ive seen code written in url format...lol can you change it please
-
you can use an onlclick event..when the event is triggered it executes a function that uses document.write() to add the data that you want to add
-
elseif (ctype_alnum($_POST['name']) == TRUE) { header( "Location:Messages.php?msg=26" ); exit();
-
what is supposed to happen when you click on one of the suggestions? im assuming that it doesnt go to a new page
-
can you explain a little more in depth what is it that you are trying to do?
-
could try something like
<option onclick="window.open('page1.php'); window.close('index.php')">Page 1</option>
-
Wow!!!
Thanks for al the quick replies!!!
Here is my AJAX code:
<html> <head> <script type="text/javascript"> function showHint(str) { var xmlhttp; if (str.length==0) { document.getElementById("txtHint").innerHTML=""; return; } if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("txtHint").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","ajax_test.php?q="+str,true); xmlhttp.send(); } </script> </head> <body> <h3>Start typing a name in the input field below:</h3> <form action=""> First name: <input type="text" id="txt1" onkeyup="showHint(this.value)" /> </form> <p>Suggestions: <span id="txtHint"></span></p> </body> </html>
Btw to make it easier to understand for you all Voornaam means firstname in dutch.
I'm going to use this query so people can fill in the first part of a name of a user and it gives some options.
did Zanus modification not work for you?
-
see also file_put_contents();
thanks, file_put_contents() is the preferred method
-
welcome, im sure we can help you
-
its actually populating an array with a specified key. was wondering on the logic thats all.
-
-
depending on how many rows you wish to grab at a time, to populate a table with values from your db..you will need to use a while loop to cycle through your db values if you plan on grabbing multiple models at a time.. if you simply want to grab the field values for a single row, you will need to use something like
$row = mysql_fetch_assoc($query);
$query being your mysql_query() resource.
then you can create a table and populate it with the db values that you wish...eg
<table><tr><td>Gain</td><td><?php echo $row['gain']; ?></td></tr>
etc...now if you are wanting to grab multiple rows, you will need the while loop i stated above..
while ($row = mysql_fetch_assoc($query)) { echo "<table><tr><td>Gain</td><td>{$row['gain']}</td></tr>"; }
hope this helps
-
Also, what is your logic behind these lines
$a = array(); for ($j=0; $j<$totalRows; $j++) { $a[$j] = mysql_fetch_row($result); }
-
you posted the same code in you "AJAX part"...can you please post your AJAX code as well
Edit: also as a quick tip...this line
WHERE voornaam ='".$q."'";
does not need to be concatenated
-
welcome...do you have any experience?
-
that worked so I put that into a separate function and called it in the window.onload and it works thanx for ur help
-
If he'd asked.. "what's the logically inept way of making this work?" - then yeah, you answered his call.
and if he asked...hey i want to know the logic behind what im doing even though I am in a hurry in school and I really dont care or have 2 hours to talk to someone about the logic instead of getting the answer that I want...you did a good job.
-
you taught him something and i answered his question...good teamwork
-
i answered his question...he's happy i'm sure...topic solved...moving on
-
welcome to phpf man...
-
could make a hit counter using a db.
-
fugix, that is awful JavaScript.
the method he was using has been deprecated..no its not awful..where is your solution?
making DIV width always the same width UL inside it!
in CSS Help
Posted
it will wrap to the contents if you make the width: auto;