Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. You need to escape the double quotes within the string. Read the manual section on string.
  2. I have no idea, I didn't write IP Board. *shrug* Sorry.
  3. http://forums.phpfreaks.com/index.php?app=core&module=usercp&tab=core&area=displayname Change Display Name You have made 0 of 1 display name changes since 08 Apr 2012. You are permitted to make 1 changes in a 365 day period. Changing your display name will not affect your log in details. Did you read it when you changed it?
  4. The two things are not related. You've been given numerous resources on what it means to normalize your table structure. Why would you think we would say now its okay to NOT do it? I checked your history, you were given good info on this topic a year ago. Troll.
  5. Yes. After we told you time and time again that you need to do X, ask us if you still need to do X. Go ahead. See what happens.
  6. It's not that complicated, it's super dumbed down PHP. If you want to work somewhere that uses it you'll have to learn it. It's not that useful when you first start PHP.
  7. flock($fp, 3); If you don't know what your code does, you're not really learning, are ya Look up every function you use and make sure you understand it. Type in php.net/function here and read. flock Changelog: 5.3.2 The automatic unlocking when the file's resource handle is closed was removed. Unlocking now always has to be done manually.
  8. From WHAT array? When you select data from the database, you can always specify that you want an associative array. Use mysql_fetch_assoc (Really, just switch to PDO) If you're actually selecting columns by the number, then stop doing that. Not only is it harder to read and understand, it's preventing you from reaching your goal.
  9. So, create the table row and put table headers in there. You haven't even tried...
  10. What version of PHP are you using? When you lock the file, you didn't unlock it. Why are you locking it in the first place, and after you write it?
  11. You're missing the part where you define $last_cinema before you ever try to use it, if you turn on strict error reporting you'll see a warning or notice. Otherwise good. Definitely normalize the tables though, I didn't see the original screenshot before, and Barand is 100% right, you need to fix your structure. Also a line like this: echo "{$row['show_time']}"; just adds extra processing. No need to put a variable in strings to echo it.
  12. http://us.php.net/manual/en/function.error-reporting.php http://us.php.net/manual/en/errorfunc.configuration.php#ini.display-errors
  13. You NEED to enable error reporting. It's rude to ask us to keep reading all your code to find your syntax errors when you could get the actual error yourself.
  14. Yes, it's possible.
  15. Yes, your syntax is way off. http://php.net/manual/en/control-structures.alternative-syntax.php Also, if you enable error reporting you would see the errors.
  16. I wrote a tutorial that addresses this: http://thewebmason.com/tutorial-parent-child-lists/ You'll want to store the cinema in a variable and compare the previous one to the current one.
  17. Obviously he bought hosting too.
  18. This boars for hunting.
  19. A. Please use code tags on our forum. B. You should really start using curly braces on your conditionals, it makes them much more readable. C. $sth = $db->prepare( "insert into cameras ( company,model,mpx,price) values('?')"); $sth->execute(array(company, model, mpx, price, id)); Way off.1. Parameters either need to be positional (?) or named (:name). You need one for EACH parameter, and you don't put them in quotes. 2. The second line will produce warnings/notices. You either need to use the $_POST array or pass in the values as variables. Right now you're using constants which will all be set to strings. You also need as many values as you have named columns/parameters. D. Why are you trying to do the insert twice? (Both very wrong.) E. When you have an auto-increment ID, don't try to insert a value into the field. Just leave the column name out of the query. I'm sure there's more but that's enough for me.
  20. A. A tutorial using PDO would say so. Same for MySQLi. However, where your code does mysql_connect("$host", "$username", "$password")or die("cannot connect"); with mysql_* functions, It would use mysqli_* functions. PDO would look like like this: $dbh = new PDO('mysql:host=localhost;dbname=test', $user, $pass); B. Turn on error reporting, set to E_ALL or -1. See my signature. C. Use the $_POST superglobal array. See the manual.
  21. That tutorial is relying on register_globals, which is BAD. BAD. If you had PHP error reporting set to show notices, you'd see some issues. Abandon that site. Look for something that is using mysqli or PDO, that will be recent enough to be useful.
  22. Dude, April's Fools day was a few days ago. But good one, expecting people to read all that code. You got us!
  23. I see the problem... It's... In your code... Which none of us can see.
  24. Store the data in the Session.
×
×
  • 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.