Jump to content

warewolfe

Members
  • Posts

    57
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://www.warewolfe.net.nz

Profile Information

  • Gender
    Not Telling
  • Location
    Otago, NZ

warewolfe's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. also it may be a good idea to put to following in as well $input = htmlentities($_POST['article_title'],ENT_QUOTES,UTF-; if(checkInput($input)) { echo"accepted<br />"; } else { echo"rejected<br />"; }
  2. function checkInput($string) { return preg_match('/^[a-z0-9\s]*$/i', $string); } This will accept letters, number and spaces. If you want full stops and other punctuation just escape the character and add within the square brackets. eg [a-z09\s\.] will let people add a full stop at the end of a sentence.
  3. What characters to you want to permit? Only Alphanumerics? Or some others like hyphen and single quotes?
  4. Hi, Just in case you come back to check this thread. $some_string = htmlentities($some_string,ENT_QUOTES); would be more secure than a string_replace.
  5. Self deleted. Orginally written in coffee deprived state.
  6. hi, a hint for working in both FF and IE is to have *{ padding:0; margin:0; } at the start of your css file. some of the problem with ie/ff incompatibility is that ie and ff have different default widths for both margins and padding. This code will turn them all off and make you set everything manually. #side-menu img { border-width:0; } should get rid of the border line in both ie and ff
  7. it depends on what the function is suppose to do and how complex a system the function is a part of. If the function is simple and its purpose is to generate atomic html then use echo. ie, if you want to print "hello world" then use echo. If the function is part of more complex system like database systems, Object oriented, and/or implementing the MVC (Model View Controller) architectural pattern then use returns. ie, complexSQLQuery( param1, param2,param3,param 4) { //complext code here return answer }
  8. use isset() to check the variable without the script failing.
  9. have you tried assigning $_POST['Submit'] and echoing to see what is actually being sent?
  10. what do you need help with?
  11. replace for($j=0; $j < count($indiGroup); $j++) { print "<option value=$indiGroup[$j]>$indiGroup[$j]</option>"; } with foreach($indiGroup as $val){ echo"<option = $val> $val </option>";}
  12. You just use the html image tag with an absolute tag. <img src="http://www.whateversite.com/images/some.imagtag" /> This is considered rude when you do it without asking. And they could change the image to whatever they want without you realising it.
  13. Are you confusing Rotate.php with a function call? What does Rotate.php do?
×
×
  • 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.