Hi requinix: That's what I thought also, but I've tried:
$filename = ('./Collection_Posts/'.$file, base64_decode($uri));
Also $filename = file_put_contents('./Collection_Posts/'.$file, base64_decode($uri)); Also $filename = ./Collection_Posts/$file; Trying to echo the filename, I'm not getting anything.
I am trying to get the actual filename so that I can attach it to an email.
I tried echo $file; but its not giving me anything. Just a blank page. Here's the code that I' working with:
$file = date('M-d-Y H:i A'). '.png';
$uri = substr($data,strpos($data,",")+1);
file_put_contents('./Collection_Posts/'.$file, base64_decode($uri));
echo $file;
exit;
Thanks haku:
Also found this after you pointed me in the Javascript match direction:
http://www.devarticles.com/c/a/Javascript/Regular-expressions-in-Javascript/6/
Xaotique: THANKS !
I got this to work like this:
<script language="javascript">
function showAlert() {
var f =document.form1.word.value;
var x = f.substring(0,1);
if(x > 1){
alert(x +" is greater than 1 ");
window.location = "http://www.basy.com/";
}
}
</script>
Now I'm Having a problem evaluating these 2 conditions
if(x > 1) || (!IsNumeric(x))
I need x to be 1 and Numeric. If there's a letter in the first position, this will catch it.
RE: Why not just set the max length of the input field to 1
.The field is used for multiple things. The # 1 at the beginning is my way to filter specific people.
I'm trying to pass a form field value to substring() to evaluate it.
my form field is like this;
Word here : <input type="text" name="word" value = " " onmouseout="functionones()">
I need to make sure that "word" is numeric only and that it begins with the number 1 If NOT, I want to show an alert and send them to another location.
I tried this, but its not working.
<script type="text/javascript">
function functionones()
var f =(document.form1.word.value):
var x = f.substring(0,1);
{
if (var x >1)
alert("Your word data is wrong");
window.location = 'http://www.basy.biz';
}
//-->
</script>
If I hard code a value of "123343466" into var f and do a doc.write, I'll get 1
Appreciate your help.
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.