Jump to content

scvinodkumar

Members
  • Posts

    209
  • Joined

  • Last visited

    Never

Everything posted by scvinodkumar

  1. Hi i have validate the URL in php. I am using the below regular expression to valdiate it...for some url its working but for few url its not working...could u plz help me this is the code i am using currently function isValidURL($url) { return preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', $url); } For example, if enter the invalid url, still it accepting, http://test
  2. Thanks for your help. But its not working as per my example, but when i change double quote to single quote, it is converting to url. Could u please tell me how to rectify this problem?
  3. Hi i searched google and found this function (http://zenverse.net/php-function-to-auto-convert-url-into-hyperlink). Its working fine until the url is not within double quotes. For example, $string = 'I have some texts here and also links such as "http://www.youtube.com" , www.haha.com and lol@example.com. They are ready to be replaced.'; When i call the function it is converting haha.com and lol@example.com only, not youtube.com. Please help me to solve this issue.. Thanks...
  4. OK friends..thanks for your solutions...let me apply...
  5. Yeah i can do like that, but its working in local system even with the same file name. Its not only working in the server....
  6. @squiblo i uploaded through form. Please tell me the solution to display image with this type of filename
  7. Hi Friends, I have uploaded a image with the file name (pics%20of-cute-girls.jpg). Its uploaded and displaying in the local system but not in the server. Could you please tell me what should be the reason for this? what setting does i need to change? For your reference i have attached that file [attachment deleted by admin]
  8. $radiobuttonvalue = $_POST['radiobuttonvalue']; $query = "update tablename set fieldname = '".$radiobuttonvalue."' where primaryfieldname=value"; consider, your form will be like this, <input type="radio" name="radiobuttonvalue" value="1">Y <input type="radio" name="radiobuttonvalue" value="0">N
  9. if(strtolower($firststring) == strtolower($secondstring)) echo "same letter"; or if (strcasecmp($firststring, $secondstring) == 0) echo "same letter";
  10. the rand() which is used to display random numbers only, for that you need to use like this $pid = array_rand($products); echo $products[$pid];
  11. Change your submit name like this, <form method="post"> <input type="submit" name="Submit1" value="SEND" /> <input type="submit" name="Submit2" value="SEND" /> <input type="submit" name="Submit3" value="SEND" /> </form> f(isset($_POST['Submit1'])) $Query = mysql_query( 'INSERT INTO `table` (`Submit`) VALUES ("' . $_POST['Submit1'] . '",)' ); f(isset($_POST['Submit2'])) $Query = mysql_query( 'INSERT INTO `table` (`Submit`) VALUES ("' . $_POST['Submit2'] . '",)' ); f(isset($_POST['Submit3'])) $Query = mysql_query( 'INSERT INTO `table` (`Submit`) VALUES ("' . $_POST['Submit3'] . '",)' ); Try this
  12. You should use like this, echo "<a href='www.link1.com/index.php' title='link 1'>message 1</a>"; whenever you open quote, you need to close quote.
  13. I think this code will produce an error while executing the query, so try like this $res = mysql_query($sql) or die(mysql_error()); and try to use php functions in small letters instead of caps, like mysql_query instead of MySQL_query
  14. i think you have not pasted right code here, so please re-post that php code
  15. You can use this calender, http://www.rainforestnet.com/datetimepicker.htm
  16. could u please much clearly, as per your post what i understand is, you want to store three different values separately, right? if so, if($_POST['Submit1']) $Query = mysql_query( 'INSERT INTO `table` (`Submit`) VALUES ("' . $_POST['Submit1'] . '",)' ); if($_POST['Submit2']) $Query = mysql_query( 'INSERT INTO `table` (`Submit`) VALUES ("' . $_POST['Submit2'] . '",)' ); if($_POST['Submit3']) $Query = mysql_query( 'INSERT INTO `table` (`Submit`) VALUES ("' . $_POST['Submit3'] . '",)' ); If this is not what u want, then explain?
  17. Yeah you have missed php open tag <?php after <?php get_header(); ?> this line or remove this closing tag in the header function '?>'
  18. I want to display date in japan, for example In English : 10/05/2008 To Japan : 2008年10月05日 how to display?
  19. i think you get this error because of missing argument value....
  20. You can like this $content = ''; while ($row = mysql_fetch_assoc($result)) { ob_start(); print_r($row); $a=ob_get_contents(); ob_end_clean(); $content .= $a; } if (fwrite($fp, $content) === FALSE) { echo "Cannot write to file ($filename)"; exit; }
  21. could u plz tell me what this function will do with decimal numbers
  22. you should concatenate result in the while loop or just echo the result instead of storing in the variable and then displaying, like in the while loop $products .=
  23. No problem, use this loop [code=php:0] for($i=0;$i<10;$i++) { if(!empty($_POST['experience'.$i])) $experience.$i = check_input(implode(",",$_POST['experience'.$i])); } [/code]
×
×
  • 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.