
hassan
Members-
Posts
45 -
Joined
-
Last visited
Everything posted by hassan
-
Mysql Drop And Revoke
hassan replied to hassan's topic in PHP for the Web: Visual QuickStart Guide (5th Edition)
Many thanks I think I get what you mean that would be a level above operating at the raw database level. -
Hi On page 645 the second tip mentions the DROP command and the REVOKE command. Would I be correct in assuming that: 1) We will use a DROP command for example if users wished to complete remove/close his or her account. 2) We will use REVOKE command for example when a users subscription ends so that we may remove read access to some paid for information
-
Hi I have tried to change the root password of MySQL after a fresh installation but have not been successful. I probably am missing something, but I have been following the installation instructions as given in the appendix. I also looked at Chapter 4 as well but I am not having any luck. I get the following output: MariaDB [(none)]> set password for 'root'@' localhost' = password('test123'); ERROR 1131 (42000): You are using MariaDB as an anonymous user and anonymous users are not allowed to modify user settings MariaDB [(none)]> I don't understand how I have become anonymous user and how do I change that.
-
Hi I think I have 4th edition of the book that has the shopping cart example. I want to learn PHP7 so I was thinking of obtaining the new version of the books. I wanted to know if the old shopping cart example will work? and is it compatible with PHP7? Also was there any reason for not including the shopping cart example in the 5th edition? many thanks .. Hassan
-
Thank again Sorry for asking too many questions ... I am enjoying it ... I started learning a while ago then stopped and now started again this time not to quit ... I realised alot of things I simply glossed over ... or didt type out all the code nor experimented much with the code ... this time round I am doing that and its alot more fun and I am enjoying it ... I think by being curious and trying out different things giving me more confidence to write my own little snippets ...
-
Shuffle()
hassan replied to hassan's topic in PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (4th Edition)
Thanks I was just experimenting with the different commands didnt quite realise what it does ... -
Hi On page 70 it discusses loops and states "The functionality of both loops is similar enough that for and while can often be used interchangeably. Still, experience will reveal that the for loop is a better choice for doing something a known number of times, whereas while is used when a condition will be true an unknown number of times." I understand that the foreach loop will get everything in an array. Where and when and why would you use a for loop instead of a while and vice-versa? (can someone give practical scenarios)? Also where and when and why would you use a do while loop? what benefits does it have instead of using foreach or for or while loops? Thanks in advance
-
Hi In the book on page 57 it states in the tips "Because PHP is lax with its variable structures, an array can even use a combination of numbers and strings as its keys. The only important rule is that the keys of an array must each be unique." How can you get duplicate keys? I tried experimenting wrote the following: <?php echo "<p>This text was generated by PHP!</p>"; echo "hello word<br>"; $states['IL'] = "hellow"; $states['IM'] = "IM hellow"; $states['IM'] = "IM hellow2"; echo $states['IL']; echo "<br>"; echo $states['IM']; echo "<br>"; echo "Test this: {$states['IM']}"; ?> It simply assigns the new value to the array and not let me create a duplicate?