Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Here some of my work...
- Email Validation
- <?
- function is_valid_email($email) {
- if(ereg("([[:alnum:]\.\-]+)(\@[[:alnum:]\.\-]+\.+)", $email)) {
- return 1;
- } else {
- return 0;
- }
- }
- ?>
- User Pass System working with MySQL
- <?
- /*
- SQL to build sample database named 'your-database-here'
- CREATE TABLE user-password-table (
- username varchar(12),
- password varchar(12),
- );
- INSERT INTO user-password-table VALUES ('your-username-here','your-password-here');
- */
- $username = "your-username-here";
- $password = "your-password-here";
- $database = "your-database-here";
- $db = mysql_connect("localhost", "$username", "$password");
- mysql_select_db("$database",$db);
- $result = mysql_query("select count(username) as Total from user-password-table where username='$username' and password='$password'",$db);
- $row = mysql_fetch_array($result);
- if ($row["Total"]=="0"):
- echo "<BODY bgcolor=\"#BFBFBF\" link=\"Black\" vlink=\"Black\" alink=\"Black\">";
- echo "<FONT FACE=\"Arial\" COLOR=\"#FFFFFF\"> ";
- echo "<CENTER><H1>WARNING:<P>USER/PASSWORD Failed!</H1></CENTER>";
- else:
- echo "<BODY bgcolor=\"#BFBFBF\" link=\"Black\" vlink=\"Black\" alink=\"Black\">";
- echo "<FONT FACE=\"Arial\" COLOR=\"#FFFFFF\"> ";
- echo "<CENTER><H1>Welcome Back $username.</H1></CENTER>";
- endif;
- mysql_close($db);
- ?>
- Open
- Open
- File
- <?php
- // Save the FDF data into a temp file
- $fdffp = fopen("test.fdf", "w");
- fwrite($fdffp, $HTTP_FDF_DATA, strlen($HTTP_FDF_DATA));
- fclose($fdffp);
- // Open temp file and evaluate data
- $fdf = fdf_open("test.fdf");
- ...
- fdf_close($fdf);
- ?>
- String
- <?php
- $fdf = fdf_open_string($HTTP_FDF_DATA);
- ...
- fdf_close($fdf);
- ?>
- I have plently more PHP coding to show you if you'd like to see more...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement