Jump to content

AyKay47

Members
  • Posts

    3,281
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by AyKay47

  1. then your mysql credentials are not correct.
  2. forgot closing bracket on last else condition.
  3. why would you want to do that? He might want to do this to hide text on an image and then he might want a javascript button that someone clicks to change display:none; to display:block; to reveal it. Like if it was an image of a cow he might want the hidden block to say Moooo... and then the button would say "Make the cow moo" and then it would reveal the block of text and it'd make the cow moo. that's an imaginative story.
  4. $site = 'ciadacapa.com.br'; //remove period my guess is this error lies within the $domain argument.
  5. if the end of the earth is soon, why bother?
  6. html is a stepping stone to other languages, and doesn't "suck"
  7. why would you want to do that?
  8. well, unless you are making this website solely for you, make sure you include games that are overall popular.
  9. which page is this? depends, is your server using php as apache module or cgi? what do you mean, "opens in a new page"? be more specific.
  10. the only way that a later key with the same value will not overwrite the previous key value is to have the keys be numeric, array_merge_recursive might be something to look at, but even so, as noted, it does not make sense to have duplicate keys in an array.
  11. yeah, the file extension needs to be .php for php code to work, the parser needs to know not to look for just html.
  12. yes but this going to be for couple of games. starcraft, fifa, mortal combat, COD but I only have information about starcraft so the web site is going to be for starcraft at first. that is a very random list of games, how did you come up with that list?
  13. I posted a link to the die() function documentation, everything you need to know about the function is there. Drop downs work fine on mobile devices.
  14. Yes you did. $_POST is a superglobal array. As such, it is always directly accessible, meaning you don't have to declare it before using it. Beyond that, NEVER use the 'global' keyword. It's a bad/sloppy way of passing variables around. If you're learning PHP from a resource that uses 'global', get a better resource. 'global' is an indicator of an amateur. For clarification on the consequences of using the global keyword, refer to KevinM1's signature.
  15. Good luck with that. You need to burn whatever book told you to do so. Enough said.
  16. $_POST; ?
  17. That is the same thing I was doing, I found it funny that you called me out on something that you went ahead and did in the same post. It's cool, was just stating.
  18. To back Zane here, since I did overlook that in your code, joins are most efficient when they join tables by indexes, the purpose of an index in MySQL is to link two tables by an indexed field and possibly restrict certain actions to be done if the indices of two linked tables do not match. Yes it will work, but as Zane stated, all it would take is a space or something small by the user if the query is dependent on user data to throw off the query.
  19. Is the same yes, however it's a bad practice to concatenation for no reason, the query you posted does the exact same thing as well.
  20. If username is coming from table c, you will need to specify that in your SQL, right now you are grabbing a.* and b.* in your code, add c.Username to that list. Shouldnt have to change anything else.
  21. the query is copy and pasted from my project. in the project, it does have divs Show all of the relevant code, if you leave stuff out that makes us have to guess.
  22. Global $_POST = no no. $_POST is already a global array. This line, $query = "INSERT INTO editablepageslist (pagenameselect)" . "VALUES ('$pagenameselect')"; Shoul be,& $query = "insert into editablepagelist (pagenameselect) values ('$pagenameselect')";
  23. Depending on the number of names you are expecting, having too many submit buttons is not practical. A select drop down would be more user friendly.
  24. 1. die 2. Why not use a <select> and populate it with you do data, have the user select from the list.
  25. You are going about this wrong. Take a look at mysql_query and mysql_fetch_arrayfor starters, you will need at least these to display data that your SQL code grabs.
×
×
  • 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.