
scvinodkumar
Members-
Posts
209 -
Joined
-
Last visited
Never
Everything posted by scvinodkumar
-
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
-
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?
-
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 [email protected]. They are ready to be replaced.'; When i call the function it is converting haha.com and [email protected] only, not youtube.com. Please help me to solve this issue.. Thanks...
-
OK friends..thanks for your solutions...let me apply...
-
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....
-
@squiblo i uploaded through form. Please tell me the solution to display image with this type of filename
-
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]
-
Upload radio button value to MYSQL filed
scvinodkumar replied to fraser5002's topic in PHP Coding Help
$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 -
if(strtolower($firststring) == strtolower($secondstring)) echo "same letter"; or if (strcasecmp($firststring, $secondstring) == 0) echo "same letter";
-
Choosing random strings from a group
scvinodkumar replied to giraffemedia's topic in PHP Coding Help
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]; -
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
-
Noob problem, code printed out as text
scvinodkumar replied to Complex Buttons's topic in PHP Coding Help
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. -
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
-
arranging images to fill all available space
scvinodkumar replied to plugnz's topic in PHP Coding Help
i think you have not pasted right code here, so please re-post that php code -
You can use this calender, http://www.rainforestnet.com/datetimepicker.htm
-
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?
-
Noob problem, code printed out as text
scvinodkumar replied to Complex Buttons's topic in PHP Coding Help
Yeah you have missed php open tag <?php after <?php get_header(); ?> this line or remove this closing tag in the header function '?>'