Maq
Administrators-
Posts
9,363 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Maq
-
I am 13 years old - money is something i dont have Information and tutorials are free, and I'm sure you'll have no problem finding some. You answered your own question. They ask for "help", you have shown no sign of attempt and therefore implying that you want someone to do it for you. If you want help, then I gave you appropriate help that is proportional to the question you asked.
-
Could you explain exactly it is your see, then exactly it is you want to see and where? I'm a little confused as to what's exactly supposed to happen.
-
This should answer most of your questions. http://www.phpfreaks.com/tutorial/php-security
-
echo"nerver) . " / " . number_format($player->maxnerve) . " [" . $nervepercent . "]' height='19'>\n";
-
Perhaps [man]mod_rewrite()[/man]? http://www.phpfreaks.com/forums/index.php/board,50.0.html
-
Sounds like you're on the right track and if you provided some code we could tell you what you need to modify. Something like: $sql = "SELECT * FROM `aircraft`WHERE client_id = 100"; $result = mysql_query($sql) or die(mysql_error()); while($row = msyql_fetch_assoc($result)) { echo $row['row1'] . " " . $row['row2'] . " " . $row['row3']; }
-
I was testing it. Just replace it with your original variable.
-
Try this, is that division sign really supposed to divide these two numbers for the title? echo"maxnerve) . " [" . $nervepercent . "] height='19'>\n";
-
When they log in, store their ID/username (if unique) in the session. When they go to view their profile look up their information by the id or username: session_start(); $id = mysql_real_escape_string($_SESSION['id']); //connection info $sql = "SELECT * FROM users WHERE userid = $id"; $result = mysql_query($sql) or die(mysql_error()); $row = mysql_fetch_assoc($result) echo "User " . $_SESSION['id'] . " account balance: " . $row['AccountBalance']; ?> Clearly state?? OK, as clear as it can be with the lack of information you provided, you need to change it to work with your script... Good luck!
-
If you just want to display the table in descending order by id do something like: SELECT * FROM table ORDER BY id DESC
-
Cannot display MySQL variables for custom micro-blog
Maq replied to R.Bucky's topic in PHP Coding Help
First, always use <?php, never short-tags, it minimizes portability. Second, I fail to see where you try to use this file. You're using: $db = mysql_connect($hostname, $db_user, $db_password); mysql_select_db($database,$db); in which all these variables are undefined, not to mention that your include file is below the code that needs to use it. -
Are you referring to actually ALTERing the MySQL table? Which is a bad idea, and most likely due to poor design. Or display it in the order you described, which I like to call, reverse, or DESCending.
-
You have a couple problems. 1) Your submit button doesn't have a name. 2) You're calling the functions to do the actual work when: if ($_POST['process'] === '1') which never happens. Try this, replace all of this: if ($_POST['process'] === '1') { print "Process = 1"; connect_db(); write_user_data(); } else { print "Process = 0"; } with: if(isset($_POST['submit'])) { print "Process = 1"; connect_db(); write_user_data(); } And replace: with this: Now when the user clicks "Go!", which is the same as isset($_POST['submit']), it will call all of your functions that process your information.
-
Hmmm, don't see that in your script anywhere, unless I overlooked it. At least it works.
-
Here's an example for passing variables to the same page and changing the query. You can substitute your link in for the $_SERVER['PHP_SELF'], this means that it's passing it to the current URL. You should also call [man]mysql_real_escape_string()[/man] on your values if they're involved in the query, to prevent SQL injection. $start = 0; $limit = 5; $common = isset($_GET['common']) ? $_GET['common'] : 1; $example = isset($_GET['example']) ? $_GET['example'] : 1; $sql = "SELECT id, img, name, level, speed, cost, type, avb FROM $tbl_name WHERE class='$example' AND type='$common' ORDER BY level LIMIT $start, $limit"; echo "Query=> " . $sql; echo " example 123 common 456"; echo " example abc common efg";
-
Yes you would need to use COUNT and GROUP BY.
-
More, like, "As long as you keep your mouth shut, it looks good".
-
Use single quotes for the attributes: echo "Go!";
-
Hahaha, I don't about the spare change... but everything else is worth it!
-
Sounds similar to subversion. There may be a client that has similar features you desire. http://subversion.tigris.org/ These are open source, so you can get some ideas on how to go about designing and creating certain features. But to answer your question, yes it's very feasible to accomplish this type of application with the listed languages, and in fact some of the clients are codes in those.
-
Now that's just sick...
-
You're going to want to look into Database Normalization. If you want to make additional categories, features, classifications, etc. then it's much easier with a normalized database.
-
if(isset($row_rs_cats['sub']) && trim($row_rs_cats['sub']) != '') {
-
Looks like you already have a check for this var being empty: if ($row_rs_cats['sub'] == '') // If subcategory is not empty //
-
Try: if (empty(trim($row_rs_cats['sub']))) { // No subcategory exists //