Jessica
Staff Alumni-
Posts
8,968 -
Joined
-
Last visited
-
Days Won
41
Everything posted by Jessica
-
Username change/login issues.
Jessica replied to Dragosvr92's topic in PHPFreaks.com Website Feedback
I have no idea, I didn't write IP Board. *shrug* Sorry. -
Username change/login issues.
Jessica replied to Dragosvr92's topic in PHPFreaks.com Website Feedback
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? -
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.
-
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.
-
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.
-
Could someone help review this code & process?
Jessica replied to RecklessArcher's topic in PHP Coding Help
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. -
display column names from database in returned values table
Jessica replied to Juarez's topic in PHP Coding Help
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. -
display column names from database in returned values table
Jessica replied to Juarez's topic in PHP Coding Help
So, create the table row and put table headers in there. You haven't even tried... -
Could someone help review this code & process?
Jessica replied to RecklessArcher's topic in PHP Coding Help
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? -
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.
-
http://us.php.net/manual/en/function.error-reporting.php http://us.php.net/manual/en/errorfunc.configuration.php#ini.display-errors
-
Code?
-
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.
-
Yes, it's possible.
-
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.
-
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.
-
Obviously he bought hosting too.
-
This boars for hunting.
-
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.
-
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.
-
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.
-
Dude, April's Fools day was a few days ago. But good one, expecting people to read all that code. You got us!
-
I see the problem... It's... In your code... Which none of us can see.
-
keep values after isset() is clicked and refreshed
Jessica replied to budimir's topic in PHP Coding Help
Store the data in the Session.