does anyone have code?

Member Avatar
Member Avatar
+0 forum 3

Hi All, thought I'd pass on a (very) simple password class which is built on the new `password_hash()` and `password_verify()` functions. You will need php 5.5.0+ in order to get this to work. If you're thinking of modifying this and using it in a production site, please check that your host has 5.5.0+, as many do not. To be honest there's not much going on beyond the two functions mentioned, but it can be modified easily to change any validation rules. [VERSION 1.1 with improved validation and rehashing](https://www.daniweb.com/web-development/php/threads/485519/a-simple-password-hash-and-verify-class#post2125105) (as suggested by veedeoo and ~s.o.s~) Comments, improvements etc. most welcome.

Member Avatar
Member Avatar
+8 forum 9

Hello, I got an assignement: to validate a google oauth2 access token using email address.... What is the simplest way of doing it? Can anyone give me some hint? I am desperate here... trying to figure it out.. but I cannot find anything understandable... So far, I discovered how to get an API key.. (I found a sample code for a google map) and it required this API key... I am really confused... can anyone give me some hint? thanks

Member Avatar
+0 forum 0

This is the project I need to finish. I am fairly new to php and this project has got me confused. Any help would be greatly appreciated The project ask for to validate ISBN 10 Number. There would be 10 digits with 1-9 being Numbers, but Number 10 is an x. This is What I have so far: This is the input page or html page: <form method="POST" action="Process10ISBN.php"> <p>Enter the ISBN 10: <input type="text" name="isbn10" /></p> <input type="submit" name="Submit" value="Submit" /> </form> This is what I have so far for the Procssing page to validate ISBN 10: <?php if …

Member Avatar
Member Avatar
+0 forum 1

chrome , firefox.. these are great browsers , and even if i write utter crappy html code, it still makes sense out of it , and tries to display it the way a proper code would have made it display. thats great stuff unless i want to know/see the errors when i make them. any such place i can do that ?

Member Avatar
Member Avatar
+0 forum 5

Hi. I am new. I don't know how to validate certain data like emai, web site and numeric value. Here is my code which is work fine. Below is my code. Pls Help me add.php <?php include_once '../inc/header.php'; ?> <Script Language="javascript"> function change_action() { var frm_obj=document.getElementById("frm"); frm_obj.action="data.php"; } </Script> <form action="" method="POST" id="frm" > <table class="" align="center" cellpadding="4" cellspacing="1"> <tr> <td><label class="lbl">ID </label></td> <td><label class="lbl">: </label></td> <td><input type="text" name="id" id="id" readonly="" class="txt"></td> </tr> <tr> <td><label class="lbl">Name </label></td> <td><label class="lbl">: </label></td> <td><input type="text" name="name" id="name" class="txt"></td> </tr> <tr> <td><label class="lbl">Address </label></td> <td><label class="lbl">: </label></td> <td><textarea name="address" id="address" class="txt" rows="5" cols="40"></textarea></td> </tr> …

Member Avatar
Member Avatar
+0 forum 13

Hi. I just wonder, is it possible, to validateform , which has been "echoed" in PHP using JavaScript function? See code below <?php if(isset($_SESSION['email'])){ echo"You are looged in as ".$_SESSION['email']. "</br> "; echo' <form action="confirmlogout.php" id"logoutform" method="post"> <input type="submit"id="sub" name="sub" onclick="" value = "LOG OUT" /> </form></br>'; } else{ echo '<h3>Please fill up registration form, to create user account</h3> <form action="signup.php" id="signform" method="POST" onSubmit="validate()"> <ul> <li>Please enter your first name: &nbsp;<input type="text" id="fname" name="fname" autofocus autocomplete="" /><div id="erfname"></div></li> <li>Please enter your last name: &nbsp<input type="text" id="lname" name="lname" onFocus="validate()" /><div id="erlname"></div></li> <li>Please enter your flat number: &nbsp<input type="text" id="hno" name="hno" /><div …

Member Avatar
Member Avatar
+0 forum 3

I'm using the Prototype framework to send a form via Ajax, and I'm using a form validation script ([url]http://tetlaw.id.au/view/javascript/...eld-validation[/url]) to validate the form. Both work beautifully by themselves. The problem is this: I need some way to merge the two so that the form submits after validation, and that the form is validated before it's submitted. Here's the validation code: [code] var dancingForm = new Validation('formDance', {useTitles:true}); [/code] And the submission code: [code] document.observe('dom:loaded', function() { function sendForm(event){ // we stop the default submit behaviour Event.stop(event); var oOptions = { method: "POST", parameters: Form.serialize("formDance"), asynchronous: true, onFailure: function (oXHR) { …

Member Avatar
Member Avatar
+0 forum 7

I have a website called ClippingPathAsia.com. There are 33 errors is showing. I have tried but its tough for me. If you have any tutorial or solution please help me.

Member Avatar
Member Avatar
+0 forum 4

Hi everyone, I'm new in vb.Net programming and i just want to ask how to validate a "Double" data type. for example. Dim number as Double number = textbox1.text If the value of "number" variable is in "Double" data type like 1.23 or 0.12 it returns a correct value and If the value of of a "number" is like ... or .. it returns an error Conversion from string "." to type 'Double' is not valid. I tried to suppres the error using the try catch but it still return the same error

Member Avatar
Member Avatar
+0 forum 6

I have an registered Win 7 Pro OEM OS on my desktop computer. Wanted to download/install Virtual PC and XP Mode, but requires running Validation Tool. Downloaded and ran (or attempted to run) GenuineCheck.exe validation tool from Microsoft, but when I try to run it I get a message that says "This version of the Windows Genuine Advantage validation tool is no longer supported. Please download the newest version and ensure that your system clock is accurate". Have searched MS website from top to bottom, and this is the only validation tool I can find. Can anyone help me with …

Member Avatar
Member Avatar
+0 forum 2

Hi, I can't seem to find the answer I'm looking for online (maybe keywords are too common?). Is my code only verifying whether my directory is created? Or is it actually validating? I need it to validate, but I'm unsure whether or not it's doing that. $dirPath = $_POST['company']; $result = mkdir($dirPath, 0755); if ($result == 1) { echo '<br/>'.$dirPath . " has been created".'<br/>'; } else { echo '<br/>'.$dirPath . " has NOT been created".'<br/>'; } Upon a second submission with the same company name and uploaded image, I get this error: Warning: mkdir() [function.mkdir]: File exists in /home/***/***/***/formulaires/processForm-test.php …

Member Avatar
Member Avatar
+0 forum 6

Hello Good day. Here is the problem I am trying to solve. I have a table as seen below. ![232465554203149acd8363d3a4a127ae](/attachments/large/3/232465554203149acd8363d3a4a127ae.jpg "232465554203149acd8363d3a4a127ae") My GOAL: Columns A through G are going to be filled with integers. (I have already created an integer model so that these cells only take integers). As the cells in that range are filled, the Totals column will decrease in number until it reaches zero. So far I have managed to use a TableModelListener to respond to the changing cell values. What I wish to do now is to prevent a cell, *that is being edited*, from *accepting* …

Member Avatar
Member Avatar
+0 forum 14

Hi every one i want to validate postal address I require the text field should contains Alphabets in Upper and lower case, numbers, hyphen, fullstops forward and back slash and commas and spaces in it currently i am using this fucntion but its not getting me the same thing which i require can anyone help me in this if(eregi("[0-9]+\s(\w)*(\W)(\s?)(\w)*(\W)(#[0-9])?(\W*)(\w)*(\W)(\s?)(\w)*(\s?)(\w)*", $address)) { $valid_address = $address; } else { $error_address = 'Street address must be valid'; }

Member Avatar
Member Avatar
+0 forum 4

I need to validate that my textbox contains a first and last name. That it only has alphabet letters and upper and lower case. I know normally names could have other charaters but for this purpose I need them only to have letters. Regular expression can not be used.... If it has ex: John 1235 has to return false.... if it has john smith jr can return true.... Can some one point me in the right direction on how to achieve this please Thanks in advance Jane

Member Avatar
Member Avatar
+0 forum 10

i'm developing an app that i intend to run on a client's intranet. i want to ensure that only email addresses with the client's domain should be registered. how do i achieve this using regular expressions?

Member Avatar
Member Avatar
+0 forum 4

Hi guys i have a problem here i have and input type file which will be containing an image file <input type="file" onchange="validate(this)"/> now my code below work in its extension detection but if it is invalid the input file still have i value i want it that if the file is invalid the file that is being browse will not be the value please see the javascript below: var _validFileExtensions = ["jpg", "jpeg", "bmp", "gif", "png"]; function validate(data) { var isvalid = false; var photo = data.value.toLowerCase(); photos = photo.split("."); photo = photos[photos.length-1]; for(var x=0;x<_validFileExtensions.length;x++){ if(_validFileExtensions[x]==photo){ isvalid = true; …

Member Avatar
Member Avatar
+0 forum 4

Hi, All, I need to check if the date values is valid this current year, for example, February 29, 2012, I have used Isdate function but it says "True", is there any other way to do this? Thanks in advance. renzlo

Member Avatar
Member Avatar
+0 forum 5

Hi, I am writing a little app that will have a rich text box that users will be able to write SQL statements and save them to SQL Server table. I would like to validate the SQL statement before saving the string. Because another process picks up the string and executes it. Is there is object that will valiate a SQL string without actually executing it? Thanks

Member Avatar
Member Avatar
+0 forum 1

How can i stop someone from posting when this form is empty? Here is my form: <form name="message" action="" > <center><input name="usermsg" type="text" id="usermsg" size="63" /> <input name="submitmsg" type="submit" id="submitmsg" value="Send" /></center> </form> Sanchixx

Member Avatar
Member Avatar
+0 forum 2

just forgot, I knew this "Textbox1.text = format(textbox1.text, “####.00”)" will set up the format to 4number with two decimal - 1234.00, how about if the user enter 12345.00, five number with two decimal, how did you do the check and give error message? Thanks.

Member Avatar
Member Avatar
+0 forum 1

Hi, I have a JavaScript validation function that worked before I changed the sendmail file to a php version (had to becfause of host's linux server). The sendmail code in the php file has some validation checking, but I would prefer to use the validation.js file with the form's onSubmit function. I've tried all kinds of changes. Figure it is something simple I'm missing. On submit, the php runs validation, but the JS seems to be ignored. Any ideas? The site is under development: www.insiderspetra.com/New/contact.asp <form class="form" name="contactform" method="post" action="send_form_email.php" onsubmit="return validate(this)" > ..usual form fields.. <input type="submit" value="Submit" class="submit" …

Member Avatar
Member Avatar
+0 forum 3

Hi all, I have a small piece of code to check that a field is numeric only, [code] function validate_numeric($variable) { return is_numeric($variable); } [/code] How can I check that text entered is text only ? so to protect against malicous attacks. . . Thanks

Member Avatar
Member Avatar
+0 forum 3

Hi all, How can i validate a text in text box? I need to check that text length is 7 and first four characters is contain "ABCD" and last three characters must contain numbers. e.g : ABCD123 Thank you.

Member Avatar
Member Avatar
+0 forum 4

I'm trying to validate the correct format for a phone number in a text box: (000) 000-0000 For a test, i made it so that a messagebox shows up saying "correct" if the format is correct. This test works well WHEN the format is correct. BUT when the format IS NOT correct, I keep getting an error saying that the index was out of the array. How can I fix it? Here's what I have... [CODE]ElseIf phonenumbertxtbox.Text.Length <> 0 Then If phonenumbertxtbox.Text.Chars(0) <> "(" And phonenumbertxtbox.Text.Chars(4) <> ")" Then MessageBox.Show("incorrect") Else MessageBox.Show("correct") End If[/CODE] I only tested the (000) because …

Member Avatar
Member Avatar
+0 forum 3

Hy, I have to write a program witch recognizes the extension of the file it gets as argument after that it has to validate the file line by line. A file should look like this: ex: Name, Age, Email, OptionalField1, OptionalField2 Anna, 22, [email]anna@smting.com[/email], completed Mark, 24, [email]mark@smting.com[/email], completed completed Alex, 22, [email]alex@smting.com[/email], completed Tim, 32, [email]tim@smting.com[/email], It has to validate the mandatory fields( name, age, email) and also the optional fields if they are completed. It has to validate the age as an Integer Any idea how can i do this? Thank you

Member Avatar
Member Avatar
+0 forum 4

Okay so I am creating a windows form to basically act as a bank ledger for an individual. Pretty simple they must enter the account information, and a beginning balance. The key is the validation, it is really tripping me up. I need to ensure that upon clicking the continue button the textboxes are validated, the first should only be alphabetical components while the second two should only be numeric components. Additionally the last box must also be numeric only. Doubles are okay, it is currency after all. My code is below. [CODE]using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; …

Member Avatar
Member Avatar
+0 forum 7

Inspired by discussion in [url]http://www.daniweb.com/tutorials/tutorial238544.html[/url] (test cases are from there) I used my magic pattern matching function transformed from numbers and adding the parts length checking loop. I like my own solution better, I do not know about you.

Member Avatar
Member Avatar
+0 forum 7

Hi, I'm not familiar with the AJAX way of doing this, hence why I'm posting this. I've got this form that needs to check if the user input is already in the database, if this isn't the case it should disable the submit button and display an error depending on which input isn't found. eg. client name isn't found... This is the form: [code=html] <form autocomplete="off" action="formaction.php" method="post"> <fieldset> <legend>Vul Zending</legend> <p><label for="zending">Zending: </label> <select id="Zending" name="zendingID"><?php echo $zending_block; ?></select></p> <p><div><label for="klant">Klant: </label> <input name="klant" type="text" size="30" value="" id="inputString" onkeyup="lookup(this.value);" onblur="fill();" /> <input type="button" value="..."></div><div class="suggestionsBox" id="suggestions" style="display: none;"><img src="image/upArrow.png" …

Member Avatar
Member Avatar
+0 forum 1

Hey Everyone! It's 6:29pm EST and I have been working on this same problem since about 9am. I'm usually able to Google my way to the solution- but I have reworded my search numerous times and went through mountains of forums trying different approaches but to no avail. Here is what I have... [B]Main.php[/B] A webpage with three disclaimers that have to be read. Each disclaimer is presented in an iFrame- and each disclaimer has a checkbox below it that must be checked in order to move forward. Here is the form code on this page... [CODE] <form action="DisclaimProcess.php" method="POST"> …

Member Avatar
Member Avatar
+0 forum 6

The End.