Jump to content

pocobueno1388

Members
  • Posts

    3,369
  • Joined

  • Last visited

    Never

Everything posted by pocobueno1388

  1. You can find many similar scripts on Google if that one doesn't work out. http://www.ajaxprogrammer.com/?p=9 http://www.dhtmlgoodies.com/index.html?whichScript=image-crop Here is a site that gives a list of image cropping scripts: http://webtecker.com/2008/03/14/list-of-image-cropping-scripts/
  2. You can use scripts the use AJAX, such as this one: http://www.artviper.net/crop.php
  3. PHP works in mysterious ways ...I honestly don't have an answer for that one.
  4. All your variables inside your echo should look like this: {$row['1eA_2eB_uitslag']} Do that to all of them and that should solve your problem.
  5. Take a look at this tutorial/thread: http://www.phpfreaks.com/forums/index.php/topic,95426.0.html
  6. You may be able to use uniqid(). This generates a random code that is never the same twice.
  7. I use PSPad, works great for me. http://www.pspad.com/
  8. What do you get if you echo out $time_y? Edit: Also, what is the date supposed to be?
  9. Well...they just entered the password with the from. So what you need to do is check if that username AND password exist for a single row, not just the username. <?php $result = mysql_query("select password from users where username ='$username' AND password='$password'"); if (mysql_num_rows($result) > 0){ echo "Correct login info!"; } else { //wrong info } ?>
  10. Try this: <?php $time_y = time() - $core->profile("birthday", $id); echo date("Y", strtotime($time_y)); ?>
  11. The error is probably because it's trying to do BOTH inserts when really you only need one. So you need to check which form was submitted, then add the information to the necessary table. <?php // 1. Create a database connection $connection = mysql_connect("x", "x", "x"); if (!$connection) { die("Database connection failed: " . mysql_error()); } // 2. Select a database to use $db_select = mysql_select_db('ur', $connection); if (isset($_POST['name']) && isset($_POST['cellphone'])){ mysql_query("INSERT INTO personal (name, cellphone) VALUES ('{$_POST['name']}', '{$_POST['cellphone']}')"); } else if (isset($_POST['company']) && isset($_POST['workphone'])){ mysql_query("INSERT INTO work (company, workphone) VALUES ('{$_POST['company']}', '{$_POST['workphone']}')"); } mysql_query("INSERT INTO message (message) VALUES ('{$_POST['message']}')"); echo "1 record added"; mysql_close($connection) ?> I would also suggest using mysql_real_escape_string() on all variables before using them in a query, especially POST variables.
  12. Could you post the code to your function rules.push()?
  13. Try this. this is the code that goes on step 2. <?php $group1 = $_POST['group1']; if ($group1 == "personal"){ print<<<HERE <form id="form1" name="form1" method="post" action=""> <p><strong>Personal Information</strong></p> <p>Full Name: <label> <input type="text" name="name" id="name" /> </label> </p> <p>Cell Phone: <label> <input type="text" name="cellphone" id="cellphone" /> </label> </p> HERE; } else if ($group1 == "work") { print<<<HERE <form id="form1" name="form1" method="post" action=""> <p><strong> Work Information</strong></p> <p>Company Name: <label> <input type="text" name="company" id="company" /> </label> </p> <p>Work Phone: <label> <input type="text" name="workphone" id="workphone" /> </label> </p> HERE; } ?> <hr /> <p><strong>Other Information</strong></p> <p>Your message:</p> <p> <label> <textarea name="message" id="message" cols="45" rows="5"></textarea> </label> </p> <p> </p> <p> <label> <input type="submit" name="submit" id="submit" value="Submit" /> </label> </p> </form>
  14. Take a look at this thread/tutorial: http://www.phpfreaks.com/forums/index.php/topic,95426.0.html
  15. You need to use the $_FILES variable. echo "upfile = ".$_FILES['upfile']['name']; More info here: http://us3.php.net/features.file-upload
  16. It's because your script exits no matter what before it even gets to that code. Do you see what I'm saying?
  17. You are missing a semi-colon after the exit on line 27. <?php $title = "Gem Store"; include("header.php");?> <b>Store Owner:</b> Welcome to my store! Here you can <i>Buy</i> and <i>Sell</i> many diferent Priceless Stones..<br><br> <br> <?php if($stat[gembag] == n) { Print "<b>Store Assistant:</b> You dont appear to have a <i>Gem Bag</i>! How do you expect to collect all the precious stones that are available in this wonderful Town?<br><br>"; Print "<b>Store Assistant:</b> Here, take this.. Its on the house, but dont get telling people we do FreeBs!<br><br>"; Print "The store Assistant hands you a <b>Small Gem Bag<br><br><br></b>"; Print "[<A href=seccity.php>Back to Town?</a>]"; mysql_query("update players set gembag='s' where id=$stat[id]"); include("footer.php"); exit; } else { Print "<b>Store Assistant:</b> How are you getting on with that <i>Small Gem Bag</i>?<br> Normally you could upgrade that tiny thing! (For a Small Fee) But right now we are out of Stock.<br><br><br>"; Print "[<A href=gemstore.php?view=smith>Visit the Gem Smith</a>] [<A href=seccity.php>Back to Town</a>]"; include("footer.php"); exit; } if($_GET['view'] == 'smith') { print "Yaaaarrrr"; include("footer.php"); exit; } ?> <?php include("footer.php");?>
  18. Change it to: if ($_GET['view'] == 'smith') {
  19. You need to setup a cron job. You can usually do this through the control panel of your host.
  20. <?php $numbers = "##_##_##"; $number = explode('_', $numbers); echo '<pre>',print_r($number),'</pre>'; ?> The first number will be stored in $number[0], second number $number[1], etc.
  21. Okay, the null values are now changing to -1, but it's still not going in the correct order. Updated query: SELECT u.userID, u.username, IFNULL(m.userID,-1) as modID FROM users u LEFT JOIN moderators m ON m.userID = u.userID WHERE last_active > (NOW() - INTERVAL 80 MINUTE) ORDER BY modID ASC, u.userID This displays the moderators in the correct order, but they are at the bottom of the list. If I put DESC instead of ASC I get the same exact result I started with. Did I follow your directions correctly?
  22. I'm creating an online users script. What I'm trying to do is display moderators at the top of the list, and then all the others members after them, which I have working fine. The problem is that it orders the moderators from highest ID to lowest. I would like it to go lowest to highest. I have a users table, and a moderators table. I don't think I need to post the structure to the tables as it should be clear when you see the query. SELECT u.userID, u.username, m.userID as modID FROM users u LEFT JOIN moderators m ON m.userID = u.userID WHERE last_active > (NOW() - INTERVAL 5 MINUTE) ORDER BY modID DESC, u.userID To get the moderators to appear at the top, I have no choice but to do "ORDER BY modID DESC". If I put ASC instead, they appear at the bottom. I know I could easily do this with two separate queries, but if it's possible with one, that would be better. Any help is greatly appreciated, thanks.
  23. You probably include the header.php file at the top of every page. So when you include another file within a script, it's calling that include again. Check and make sure thats not what's happening.
×
×
  • 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.