Jump to content

AyKay47

Members
  • Posts

    3,281
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by AyKay47

  1. can you post the code you are using please...
  2. my apologies if I reiterated something already said, I don't always read all of the replies...
  3. from this snippet of code it's hard to say, there are a few things that I see here 1. the use of $this should be used inside of a class definition, if this code is inside of a class, please show the class as well. 2. Please show the custom functions. 3. I would recommend using COUNT(*) rather than COUNT(col) in most cases, much more efficient
  4. the reason why $username = $_POST['username']; $password = $_POST['password']; are not working is because you have set your form method to GET instead of POST. In order to call the input values using $_POST you will need to change your form method to POST. Also, the use of session_register is deprecated, the preferred method is $_SESSION
  5. do you receive any errors upon uploading in your error.log? If, not, do you have your display_errors set to ON and error_reporting set to 1? If you are not sure, you can check with these lines... print(ini_get('display_errors')); print(ini_get('error_reporting')); error_reporting(E_ALL); if(!ini_get('display_errors')) {ini_set('display_errors','On')};
  6. yeah file, sorry it's been a long day. When I first started coding I messed with this file prematurely, man was that a bad time for me... :'( yes you did specify that thorpe, just read more thoroughly, my apologies
  7. A word of caution, if you are going to tamper with the directory that thorpe pointed out, study on how to edit this correctly before beginning, as tampering with this directory ignorantly can mess with a lot of important settings
  8. $pattern = '~^([1-7,]{1,6}[1-7]{1})$~'; preg_match($pattern,$string,$matches); should work for you
  9. This most likely has to do with the pathing used in your move_uploaded_file function...try using a relative path to the DOC_ROOT
  10. what does it print when you encase $print in double quotes instead of singles?
  11. 1. you are selecting *, then specific fields...one or the other. 2. Do both of your tables have the same count of fields..? 3. what error(s) do you receive?
  12. you can most certainly print html tags with PHP.....
  13. i assume that when someone bids for an item, a form will be submitted which will trigger code...right? So wouldn't you be "notified" then?
  14. just to nit pick a little... your line echo "blah {$value}" should be echo "blah $value" complex syntax is not needed unless text immediately follows the variable names...
  15. I have just noticed that you are not actually running your first query to check for the input data in your db <?php $privateleaguename = $_POST['privateleaguename']; $privateleaguepasscode = $_POST['privateleaguepasscode']; $query = mysql_query("SELECT privateleagueid, privateleaguename, privateleaguepasscode FROM privateleague WHERE privateleaguename = $privateleaguename AND privateleaguepasscode = $privateleaguepasscode"); //added mysql_query() if($query){ mysql_query("UPDATE login SET privateleagueid = privateleague.privateleagueid WHERE userid = '{$_SESSION['userid']}'"); } else{ echo "Private League Name or Passcode incorrect"; } ?>
  16. using print there was simply for example purposes, I normally use echo...I prefer to use double quotes when I am working with variables simply because I believe that concatenating all the time is a pain... But really the differences are minimal and boil down to personal choice
  17. well in the case of echoing a simple string, it wouldn't really matter, however if you were to echo a string with variables inside, you would want to use double quotes so you will not need to concatenate...variables inside of double quotes are parsed as a variable as opposed to a variable placed inside of single quotes (apostrophes) which would be translated as a string...for example $var = "Hello"; print("$var World"); //would print Hello World print('$var World');// would print $var World
  18. here you go, should work for you mysql_query("UPDATE login, privateleague SET login.privateleagueid = privateleague.privateleagueid WHERE login.userid = '{$_SESSION['userid']}'") or exit(mysql_error());
  19. I am not sure why you would want to do this, and your memory/server won't be thanking you...
  20. without seeing your code and logic here, I can't help a whole lot can you please post your code
  21. try debugging the query to display any errors that are occuring.. mysql_query("UPDATE login SET privateleagueid = privateleague.privateleagueid WHERE userid = '{$_SESSION['userid']}'") or exit(mysql_error());
  22. basically an AND statement allows you to add more than one condition in addition to a WHERE statement $sql = "SELECT * FROM Customer WHERE Serial LIKE '%" . mysql_escape_string($_GET[serial']) . "%' AND tbl_col LIKE '%something%' ORDER BY Serial "; Also, I don't recommend sanitizing input inside of a query function...can get messy and at times lead to unnecessary errors.
  23. you could also use an output buffer... http://us.php.net/manual/en/ref.outcontrol.php
  24. also http://www.phpfreaks.com/forums/index.php?topic=37442.0
×
×
  • 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.