Posts

Showing posts with the label php mysql css and js

Read Ajax Very Easily

• If we are able to make web page section to be refreshed without the use of flash and java then probably we are using Ajax. Ajax brings web interfaces using XHTML and CSS up to desktop application interface standards. • The closest JavaScript had to offer came in the form of the setTimeout and setInterval library functions, which required delayed, seemingly parallel execution rather than the actual spawning of processes. • Asynchronous Javascript And XML make the acronym Ajax which is the full form of it. Ajax as asynchronous • Ajax does exist as an incredibly useful method of communicating with the server directly from JavaScript. • Many Ajax-based web applications use the asynchronous flag of the XMLHttpRequest object solely to handle network errors • The direct JavaScript-to-server communication provided by the XMLHttpRequest forms the core of the technology Ajax as javascript • Ajax is one of the technologies which provide an interface by which JavaScript can send and receive data

Ajax as asynchronous javascript and xml

• If we are able to make web page section to be refreshed without the use of flash and java then probably we are using Ajax. Ajax brings web interfaces using XHTML and CSS up to desktop application interface standards. • The closest JavaScript had to offer came in the form of the setTimeout and setInterval library functions, which required delayed, seemingly parallel execution rather than the actual spawning of processes. • Asynchronous Javascript And XML make the acronym Ajax which is the full form of it. Ajax as asynchronous • Ajax does exist as an incredibly useful method of communicating with the server directly from JavaScript. • Many Ajax-based web applications use the asynchronous flag of the XMLHttpRequest object solely to handle network errors • The direct JavaScript-to-server communication provided by the XMLHttpRequest forms the core of the technology Ajax as javascript • Ajax is one of the technologies which provide an interface by which JavaScript can send and receive data

A-Z list of linux command

A alias Create your own name for a command arch print machine architecture ash ash command interpreter (shell) awk (gawk) pattern scanning and processing language B basename Remove directory and suffix from a file name bash GNU Bourne-Again Shell bsh Command interpreter (Shell) bc Command line calculator bunzip2 Unzip .bz2 files C back to commands top cat Concatenate a file print it to the screen chgrp Change the group designation of a file chmod Change file permissions chown Change the owner of a file cjpeg Compress an image file to a JPEG file clear Clear terminal screen (command line) comm Compare two sorted files stty cooked Formatting the display of text in a terminal cp Copy command cpio Copy files to and from archives csh C Shell cut Print selected parts of lines to standard output D back to commands top date Display date and time dc Command line calculator df Show amount of disk space free diff Determine difference between two files diff3 Determine d

Code to insert check box elements in the database

Code to insert check box elements in the database <?php if(isset($_POST['button'])) { //count-counts varibale in array $num=count($_POST['hobbies']); $errors=array(); $total_hobbies=""; for($i=0;$i<$num;$i++) { $total_hobbies=$total_hobbies.$_POST['hobbies'][$i].","; } $total_hobbies = substr($total_hobbies, 0,-1); // returns "ef" //echo $total_hobbies; if(empty($_POST['name'])) { $errors[]="Your Name field is empty.Please fill it"; } else { $name=$_POST['name']; } if(empty($_POST['address'])) { $errors[]="Your address field is empty.Please fill it"; } else { $address=$_POST['address']; } if(empty($_POST['user_name'])) { $errors[]="Your user_name field is empty.Please fill it"; $user_name=FALSE; } else { $user_name=$_POST['user_name']; } $education=$_POST['education']; $gender=$_POST['gende

Building a CMS with PHP Part 4 - Editing Posts

Building a CMS with PHP Part 4 - Editing Posts video download

Building a CMS with PHP and MYSQL Part 3

Building a CMS with PHP and MYSQL Part 3

Building a CMS with PHP and MYSQL Part 2

Building a CMS with PHP and MYSQL Pat 2 video, php tutorials video, php and mysql to make cms video

Creating a CMS with PHP and MYSQL

Creating a CMS with PHP and MYSQL, php video tutorial for making the Cms with php and mysql, Creating a CMS with PHP and MYSQL video, video to make site to edit, delete and update the contents

php video tutorial

php video, php tutorial video, php simple tutorials video, simple php video tutorials

Php and mysql free book download

Php Mysql

Download free php and mysql books

Php Mysql

definition of php function explode () function

<?php // Example 1 $pizza = "piece1 piece2 piece3 piece4 piece5 piece6"; $pieces = explode(" ", $pizza); echo $pieces[0]; // piece1 echo $pieces[1]; // piece2 // Example 2 $data = "foo:*:1023:1000::/home/foo:/bin/sh"; list($user, $pass, $uid, $gid, $gecos, $home, $shell) = explode(":", $data); echo $user; // foo echo $pass; // * ?> Description array explode ( string $delimiter , string $string [, int $limit ] ) Returns an array of strings, each of which is a substring of string formed by splitting it on boundaries formed by the string delimiter .

Simple login using php

<?php if(isset($_POST['button'])) { $user_name=$_POST['user_name']; $pass=$_POST['pass']; include('connect.php'); //echo md5('pass'); $query1="select user_id from profile where user_name=\"$user_name\" and pass=MD5(\"$pass\")"; //echo $query1; $result1=mysql_query($query1); if(mysql_num_rows($result1)>0) { echo "You are logged in"; //redirect //session start } else { echo "Wrong username and password please try again."; } } ?> <form id="form1" name="form1" method="post" action="login.php"> <p>Username <label> <input type="text" name="user_name" id="textfield" /> </label> </p> <p>Password <label> <input type="password" name="pass" id="textfield2" /> </label> </p> <p>

Upload your photo with php code

<?php if(isset($_POST['button'])) { //count-counts varibale in array $num=count($_POST['hobbies']); $errors=array(); $total_hobbies=""; for($i=0;$i<$num;$i++) { $total_hobbies=$total_hobbies.$_POST['hobbies'][$i].","; } $total_hobbies = substr($total_hobbies, 0,-1); // returns "ef" //echo $total_hobbies; if(empty($_POST['name'])) { $errors[]="Your Name field is empty.Please fill it"; } else { $name=$_POST['name']; } if(empty($_POST['address'])) { $errors[]="Your address field is empty.Please fill it"; } else { $address=$_POST['address']; } if(empty($_POST['user_name'])) { $errors[]="Your user_name field is empty.Please fill it"; $user_name=FALSE; } else { $user_name=$_POST['user_name']; } $education=$_POST['education']; $gender=$_POST['gender']; if(strlen($_POST['pass'])<4)

Search code part 3

<html> <head> <title>Search Test</title> </head> <body topmargin="0" leftmargin="0"> <form action="search.php" method="post"> Search Term <input type="text" name="searchterm"><br /> <input type="submit" value="Search"> </form> </body> </html> <?php /*set varibles from form */ $searchterm = $_POST['searchterm']; trim ($searchterm); /*check if search term was entered*/ if (!$searchterm){ echo 'Please enter a search term.'; } /*add slashes to search term*/ if (!get_magic_quotes_gpc()) { $searchterm = addslashes($searchterm); } /* connects to database */ @ $dbconn = new mysqli('host', 'username', 'password', 'database'); if (mysqli_connect_errno()) { echo 'Error: Could not connect to database. Please try again la

Search code part 2

this code source... <?php /*set varibles from form */ $searchterm = $_POST['searchterm']; Trim ($searchterm); /*check if search term was entered*/ If (!$searchterm){ echo 'Please enter a search term.'; } /*add slashes to search term*/ If (!get_magic_quotes_gpc()) { $searchterm = addslashes($searchterm); } /* connects to database */ @ $dbconn = new mysqli('localhost', 'root', '', 'sample1'); If (mysqli_connect_errno()) { Echo 'Error: Could not connect to database. Please try again later.'; Exit; } /*query the database*/ $query = "select * from sheet1 where IndexNo like '%".$searchterm."%'"; $result = $dbconn->query($query); /*number of rows found*/ $num_results = $result->num_rows; echo '<p>Found: '.$num_results.'</p>'; /*loops through results*/ For ($I=0; $I <$num_results; $I++) { $num_found = $I + 1; $row = $result->fetch_assoc(); Echo "$num_found. &

Search code part 1

1st part CREATE TABLE users (fname VARCHAR(30), lname VARCHAR(30), info BLOB); INSERT INTO users VALUES ( "Jim", "Jones", "In his spare time Jim enjoys biking, eating pizza, and classical music" ), ( "Peggy", "Smith", "Peggy is a water sports enthusiast who also enjoys making soap and selling cheese" ),( "Maggie", "Martin", "Maggie loves to cook itallian food including spagetti and pizza" ),( "Tex", "Moncom", "Tex is the owner and operator of The Pizza Palace, a local hang out joint" ) 2nd part <h2>Search</h2> <form name="search" method="post" action="<?=$PHP_SELF?>"> Seach for: <input type="text" name="find" /> in <Select NAME="field"> <Option VALUE="fname">First Name</option> <Option VALUE="lname">Last Name</option> <

Edit the row from the database

<?php if(isset($_GET['user_id'])) { $user_id=$_GET['user_id']; } else if(isset($_POST['user_id'])) { $user_id=$_POST['user_id']; } else { $user_id=0; } if($user_id!=0) { //echo "$name $address $user_name $pass"; if (mysql_connect("localhost","root","")) { //echo "connected"; mysql_select_db("php_classes"); if(isset($_POST['button'])) { $name=$_POST['name']; $address=$_POST['address']; $user_name=$_POST['user_name']; $query1="select user_id from profile where user_id=$user_id"; $result1=mysql_query($query1); if(mysql_num_rows($result1)==0) { echo "This username is not available"; } else { $query="update profile set name='$name',address='$address',user_name='$user_name' where user_id=$user_id limit 1"; //echo $query; $result=mysql_query($query); if (mysql_affected_r

list the users in the database

<?php if (mysql_connect("localhost","root","")) { mysql_select_db("php_classes"); $query="select * from profile"; $result=mysql_query($query); if (mysql_num_rows($result)>0) { ?> <table width="100%" border="1" cellspacing="0" cellpadding="0"> <tr> <td>Name</td> <td>Address</td> <td>Username</td> <td>Added</td> <td>Delete</td> <td>Edit</td> </tr> <?php while ($rows=mysql_fetch_array($result,MYSQL_ASSOC)) { ?> <tr> <td><?php echo "{$rows['name']}"; ?></td> <td><?php echo "{$rows['address']}"; ?></td> <td><?php echo "{$rows['user_name']}"; ?></td> <td><?php echo "{$rows['added_on']}"; ?&

insert in the database using the php code

<?php if(isset($_POST['button'])) { $name=$_POST['name']; $address=$_POST['address']; $user_name=$_POST['user_name']; $pass=$_POST['pass']; //echo "$name $address $user_name $pass"; if (mysql_connect("localhost","root","")) { //echo "connected"; mysql_select_db("php_classes"); $query1="select user_id from profile where user_name=\"$user_name\""; $result1=mysql_query($query1); if(mysql_num_rows($result1)>0) { echo "This username is not available"; } else { $query="insert into profile(name,address,user_name,pass,added_on) values ('$name','$address','$user_name',MD5('$pass'),NOW())"; //echo $query; $result=mysql_query($query); if (mysql_affected_rows()==1) { echo "You Are registered"; } else { echo "You Are NOT r