Jump to content

AyKay47

Members
  • Posts

    3,281
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by AyKay47

  1. sorry, my answer was unclear, escape data to be inserted, use htmlentities to output.. however it would still be acceptable to use htmlentities before database insertion.. just wouldn't be as clean/organized.
  2. typically using both mysql_real_escape_string and htmlentities is a good way of sanitizing user input before inserting it into a database
  3. if the variable $showarchive exists, then the checkbox will be checked by default, else it will not be chekced
  4. with jquery you will want to use the .change event handler http://api.jquery.com/change/ with this you can detect when a user changes to a different option in your select tag.. when they do, you can trigger an ajax function to handle the change and make it do whatever you want..
  5. i wsan't yelling, im at work and the work that I do is in caps.. sorry, i will talk about the code but i will not write code for you.. i do not have time for it atm
  6. YOU CAN FIND MANY EXAMPLES BY GOOGLING THE MATTER.
  7. you will want your ajax function to be triggered by the "onchange" event to detect a change in the select value..for ajax script i recommend using jquery's AJAX API
  8. well at least you learned the correct way to write a script tag!.. heh okay let's look at this further.. perhaps you will want to put this function into the head of your html page instead of the body since it is a listener.. yeah okay i was quite confused as to where the javascript had to go, ill place it into the HEAD. i found the problem, the OPEN_login function was missing () its working now thanks! shoot yeah it is, my apologies for missing something simple like that...sometimes i overlook the small things
  9. well at least you learned the correct way to write a script tag!.. heh okay let's look at this further.. perhaps you will want to put this function into the head of your html page instead of the body since it is a listener..
  10. i think that once the OP responds to my last question we can proceed.. if he is receiving a blank page, there is a good probability that an error is being triggered here..
  11. really your javascript is very simple and looks correct.. the only thing that i notice is in your script tag, the use of language instead of type.. <script type="text/javascript" language="javascript"> not sure if that will make a difference, but i believe it might..
  12. well to be honest im not really sure what layout you are trying to show here.. however it seems that you are getting unexpected breaks because you set your elements display to "block" which will create a line break before and after the element..
  13. well obviously something is happening.. do you have error reporting on and display errors on?
  14. where are your <head></head> and <body></body> tags?
  15. so when you click on the submit button nothing happens? can you explain the situation a little more thorough.
  16. what is your class name and where is $cid coming from?
  17. before i look at the code, give the exact error please
  18. not really sure what you are asking here.. if you are asking what prerequisites you need to learn PHP, you really should know at least HTML, Javascript and CSS.. but i suppose they are not necessary to learn PHP in itself.. however PHP coincides with these languages for designing/programming websites..
  19. It is so valid. What gave you the idea that it wasn't And if there are zero rows, well then 0 is the same a false. If this were a mysql issue, I'd imagine the OP would have posted a mysql error. i stand corrected.. i forgot that it returns an int on success and FALSE on failure... how stupid of me..my apologies..
  20. can't rely on that method as a user can have multiple ip adresses.. OP is your script still not working with the change that i suggested?
  21. <?php $string = "<h2 class='posttitle'> <a class='entry-title' title='ANYTHING here' rel='bookmark' href='http://ANYURL'>ANYTHING here</a> </h2> "; $pattern = "~<h2 .*>(.*)</h2>~is"; preg_match($pattern,$string,$matches); print_r($matches); ?>
  22. you did that for all of your post values shown? if you did, it will not show that error
  23. the way your code is now, or at least the code you have shown.. it will redirect to whatever the user types in... you are not checking the database for the proper url at all.. perhaps show more relevant code.
  24. wrap all of your indices in quotes.. eg $e_name = $_POST['e_name']; $aname = $_POST['aname']; etc...
  25. the return value for mysql_num_rows is an integer not a boolean value.. !mysql_num_rows is not valid.. if(mysql_num_rows($counters) == 0){ mysql_query("INSERT INTO counters (userid, impressions, date) VALUES('$userid', '1', current_date)") or die(mysql_error()); }
×
×
  • 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.