tag:blogger.com,1999:blog-14143569267931700922024-02-18T18:30:59.025-08:00Php Source CodesPhp Source Codes the title related to various forms using in Php.Here i concentrate on topics such as checkbox,radiobutton,lists,javascript,Designing tips,mysql and so on.. with examples.Mohiddinhttp://www.blogger.com/profile/03610678833214736380noreply@blogger.comBlogger25125tag:blogger.com,1999:blog-1414356926793170092.post-51090181529584458792018-02-02T08:07:00.000-08:002018-02-02T08:07:05.056-08:00How to set current page active when menu in php file<div dir="ltr" style="text-align: left;" trbidi="on">
Active menu item is simple when we go with HTML but when we develop website through PHP, its little bit difficult.
As in HTML we can simply call active class for each menu label, here we need to write some dynamic CSS, here our hope/clue is URL . Based on URL we can do some magic. Lets assume we have class called "current" and we want this class active based on page we areee...<br />
<br />
<br />
<u><b>Code is simple look how i convert,
</b></u><br />
<br />
<br />
<br />
<br />
<ul id="menu" ><br />
<br />
<li class="activemenu"><a title="Home" href="index.php">Home</a></li><br />
<br />
<li class="activemenu"><a title="About us" href="about-us.php">About us</a></li><br />
<br />
<li class="activemenu"><a title="services" href="services.php">Services</a></li><br />
<br />
<li class="activemenu"><a title="Security Doors" href="security-doors.php">Security Doors</a></li><br />
<br />
<br />
<br />
<li class="activemenu"><a title="Gallery" href="gallery.php">Gallery</a></li><br />
<br />
<li class="activemenu"><a title="Contact Us" href="contact.php">Contact Us</a></li><br />
<br />
</ul><br />
<br />
<br />
<u><b>Dynamic CSS Menu reading page URL</b></u><br />
<br />
<br />
<span style="background-color: #444444; color: white; font-family: arial, sans-serif;"><ul id="menu" ></span><br />
<span style="background-color: #444444; color: white; font-family: arial, sans-serif;"><br /></span>
<span style="background-color: #444444; color: white; font-family: arial, sans-serif;"> <li class="<?php if(basename($_SERVER['SCRIPT_NAME']) == 'index.php'){echo 'activemenu'; }else { echo ''; } ?>"><a title="Home" href="index.php">Home</a></li></span><br />
<span style="background-color: #444444; color: white; font-family: arial, sans-serif;"><br /></span>
<span style="background-color: #444444; color: white; font-family: arial, sans-serif;"> <li class="<?php if(basename($_SERVER['SCRIPT_NAME']) == 'about-us.php'){echo 'activemenu'; }else { echo ''; } ?>"><a title="About us" href="about-us.php">About us</a></li></span><br />
<span style="background-color: #444444; color: white; font-family: arial, sans-serif;"><br /></span>
<span style="background-color: #444444; color: white; font-family: arial, sans-serif;"> <li class="<?php if(basename($_SERVER['SCRIPT_NAME']) == 'services.php'){echo 'activemenu'; }else { echo ''; } ?> activemenu"><a title="services" href="services.php">Services</a></li></span><br />
<span style="background-color: #444444; color: white; font-family: arial, sans-serif;"><br /></span>
<span style="background-color: #444444; color: white; font-family: arial, sans-serif;"> <li class="<?php if(basename($_SERVER['SCRIPT_NAME']) == 'security-doors.php'){echo 'activemenu'; }else { echo ''; } ?>"><a title="Security Doors" href="security-doors.php">Security Doors</a></li></span><br />
<span style="background-color: #444444; color: white; font-family: arial, sans-serif;"><br /></span>
<span style="background-color: #444444; color: white; font-family: arial, sans-serif;"> </span><br />
<span style="background-color: #444444; color: white; font-family: arial, sans-serif;"><br /></span>
<span style="background-color: #444444; color: white; font-family: arial, sans-serif;"> <li class="<?php if(basename($_SERVER['SCRIPT_NAME']) == 'gallery.php'){echo 'activemenu'; }else { echo ''; } ?>"><a title="Gallery" href="gallery.php">Gallery</a></li></span><br />
<span style="background-color: #444444; color: white; font-family: arial, sans-serif;"><br /></span>
<span style="background-color: #444444; color: white; font-family: arial, sans-serif;"> <li class="<?php if(basename($_SERVER['SCRIPT_NAME']) == 'contact.php'){echo 'activemenu'; }else { echo ''; } ?>"><a title="Contact Us" href="contact.php">Contact Us</a></li></span><br />
<span style="background-color: #444444; color: white; font-family: arial, sans-serif;"><br /></span>
<span style="background-color: #444444; color: white; font-family: arial, sans-serif;"> </ul></span><br />
<span style="background-color: #444444; color: white; font-family: arial, sans-serif;"><br /></span>
<span style="background-color: #444444; color: white; font-family: arial, sans-serif;"><br /></span>
<span style="background-color: #444444; color: white; font-family: arial, sans-serif;">Now you can call your menu </span><span style="color: white; font-family: arial, sans-serif;"><?php include 'menufilename.php';?> on any php page.</span></div>
Mohiddinhttp://www.blogger.com/profile/03610678833214736380noreply@blogger.com0tag:blogger.com,1999:blog-1414356926793170092.post-91091106464898150332013-10-27T06:51:00.002-07:002013-10-27T06:51:57.606-07:00How to fix W3C CSS3 validation errors for box-shadow?<div dir="ltr" style="text-align: left;" trbidi="on">
Now a days so many people wants their website HTML and CSS bugs/error free ,. So they test website by submitting to major W3C validation website for finding the errors, Anyway here i am explaining how to get rid of from the issue.. box- shadow errors. Well we have other W3C errors too, but i will explain in my next post.<br />
<br />
Just like others i also develop websites in better manner with latest web techniques like CSS3 and HTML 5 but when i test my website i always face more errors with CSS compared to HTML and the one of my most disturbing error is with box-shadow because i love developing websites with shadow effects rather than using Photoshop techniques ,as i always want my developed website load quickly. So whenever we need use box shadow effect its better to use like below,<br />
<br />
<b>box-shadow:0px 5px 5px #eee;</b><br />
<br />
in place of, <br />
<span style="color: red;">-moz-box-shadow: <b>0px 5px 5px #eee;</b><br />-webkit-box-shadow: <b>0px 5px 5px #eee;</b></span><br />
<br />
<br />
Comments are welcome for this posts and also if you have any doubts, thanks for reading my post.<br /> </div>
Mohiddinhttp://www.blogger.com/profile/03610678833214736380noreply@blogger.com1tag:blogger.com,1999:blog-1414356926793170092.post-52685767088125969062012-03-31T03:54:00.000-07:002012-03-31T03:54:02.505-07:00Onclick hide for single or multiple div, table,tr,.. Tags with the same function name Using JavascriptOnclick hide for single or multiple div, table,tr,.. Tags with the same function name can be done using IDs. Mostly these types of code are used for dynamic contents which are generated from Mysql and so on. Any way the code is as follows:
<html><br>
<head><br>
<script><br>
function hide(str)<br>
{<br>
var elem = document.getElementById(str);<br>
elem.style.display = 'none';<br>
}<br>
<br>
</script><br>
</head><br>
<body><br>
<br>
<h2 align="center">Using the display property of CSS</h2><br>
<br>
<a href="#" onclick="hide(this.id);" id="1">Here is some text which I want to hide</a><br>
<a href="#" onclick="hide(this.id);" id="2">Here is some text which I want to hide</a><br>
<a href="#" onclick="hide(this.id);" id="3">Here is some text which I want to hide</a>
<p> </body><br>
</html>
Note: This code also be used by putting ID s for div, table, tr and so on.. In the same time you are also able to call onclick function by setting them in a button. As you know in above I put id and I also called function in same anchor tag, if you observe. I hope this code is very useful for you. Happy codingMohiddinhttp://www.blogger.com/profile/03610678833214736380noreply@blogger.com0tag:blogger.com,1999:blog-1414356926793170092.post-81392590296554766682011-05-14T09:39:00.000-07:002011-05-14T09:39:25.710-07:00Code for moving particular area of the page<div align="justify">Code for moving particular area of the page is mainly useful when the web pages are lengthy and also for easily moving to top of the page from bottom of the same page. It's simple one line code with anchor tag and id.<br />
<br />
Meanwhile, if you want to navigate to particular area of the same page than the anchor tag will be,<a href="#cf" > and,<br />
if you want to navigate to particular area of some other page than the anchor tag will be, <a href="onlinewebprt.html#cf" > , but condition is that particular are should be kept in id tag which is mentioned in the anchor tag. As here i mentioned id as cf so particular content will be in <br />
<div id="cf"><br />
<br />
<div id="cf"><br />
<p>----------------------</p> </div> <br />
<br />
<br />
</div></div>Mohiddinhttp://www.blogger.com/profile/03610678833214736380noreply@blogger.com2tag:blogger.com,1999:blog-1414356926793170092.post-72673155637019744532011-05-08T10:05:00.000-07:002011-05-08T10:29:55.764-07:00Displaying current date in textbox at page on load<div align ="justify">Displaying current date in textbox at page on load is very with a single function, I checked this function by putting the script in between head tags but i didn't work, Then again i put in the body section then it working perfectly.<br />
This function reads current system time of our PC. But i am not fully satisfy with this code i want to be with global internet date. Mean while the code is as follows , hope it will helpful you guys.<a name='more'></a><br />
<br />
<body><br />
<br />
....<br />
<br />
<form action="" method="post"><br />
<br />
<input id="currentdate" name="currentdate" size="20" /><br />
<br />
</form><br />
<script type="text/javascript"><br />
<br />
var currenttime = new Date();<br />
var month = currenttime.getMonth() + 1;<br />
var day = currenttime.getDate();<br />
var year = currenttime.getFullYear();<br />
<br />
document.forms[0].currentdate.value = month + "-" + day + "-" + year;<br />
<br />
</script><br />
.....<br />
<br />
</body><br />
<b><u><br />
</u></b></div>Mohiddinhttp://www.blogger.com/profile/03610678833214736380noreply@blogger.com5tag:blogger.com,1999:blog-1414356926793170092.post-13209965591098354212011-04-26T08:45:00.000-07:002011-04-26T08:51:32.349-07:00SEO for beginners<div dir="ltr" style="text-align: left;" trbidi="on"><div>SEO for beginners this post must be read by those peoples who are new to internet marketing. Basically the term SEO means Search Engine Optimization which include with different web tactics, commonly these SEO classified into two types.<br />
<ol style="text-align: left;"><li>On Page Seo.</li>
<li>Off Page Seo.</li>
</ol></div>A thing that you people observe in this post, that i am just giving introduction about SEO, i want to explain each and every part of seo with different posts so that you people can understand clearly. Mean while in On Page Seo work we handle meta tags, content writing, image optimization, anchor tags, head tags and so on..<br />
<a name='more'></a><br />
<br />
Where as in Off Page Seo, we deal with back links by performing work on off side of the page.It's true that in Off Page Seo we do directories submission, social bookmarking, wikis, comment posting, link exchange with reciprocal, press release, involving in forums and important one article submissions and so on.. Behalf of this we have two more techniques,<br />
<ol style="text-align: left;"><li>White hat techniques.</li>
<li>Black hat techniques</li>
</ol>that mostly SEO gurus using to beat out the competitor in the in the internet market. But its safe to use White hat techniques always rather than Black hat techniques.Today one of the back link methodology that mostly people following to get quick back links i.e. Angela and Paul style actually they are two but there work is quite similar.Behalf of this i don't want confuse you guys, So don't miss my next some of the posts i want to discuss about <b>SERP</b> concepts, algorithms, back linking, about meta tags and so on..<br />
<div><br />
<br />
</div></div>Mohiddinhttp://www.blogger.com/profile/03610678833214736380noreply@blogger.com1tag:blogger.com,1999:blog-1414356926793170092.post-75269653857042748162011-01-05T22:04:00.000-08:002011-04-25T06:55:27.915-07:00Converting excel data to mysql database.<div dir="ltr" style="text-align: left;" trbidi="on"><div align="justify">Converting excel data to mysql database is very important in those days because so many companies wants maintain their old/current excel data into mysql database so that they can access from any where by maintaining some authentication, not only authentication but also useful for particular record, attribute and so on..<br />
<div class="MsoNormal"><br />
</div><div class="MsoNormal">In most cases this methodologies are useful for those who want convert their previous old excel data to mysql database. Mean while if you want Converting excel data to mysql database you have to follow three conditions and the conditions are,<br />
<a name='more'></a></div><div class="MsoNormal"><br />
</div><div class="MsoNormal">1. Excel data must be in CSV (Comma delimited) format.</div><div class="MsoNormal"><br />
</div><div class="MsoNormal">2. It should not contain any highlights or colors used.</div><div class="MsoNormal"><br />
</div><div class="MsoNormal">3. The first row and first column should fill up with some value that means it not be null.</div><div class="MsoNormal"><br />
</div><div class="MsoNormal">If you familiar with above conditions than follow next three steps for converting excel data to mysql database.</div><div class="MsoNormal"><br />
</div><div class="MsoNormal">1. Open link <a href="http://localhost/phpmyadmin">http://localhost/phpmyadmin</a> .</div><div class="MsoNormal"><br />
</div><div class="MsoNormal">2. Create some database, in that create a table name but this table name must same to excel sheet name (which you want to convert) and when come to no. of fields just take no. of fields(headings) located in excel data. </div><div class="MsoNormal"><br />
</div><div class="MsoNormal">3. Now fill the fields (headings) and provide data type=”text” for each (remember no. of fields equal to no. of columns of excel data).</div><div class="MsoNormal"><br />
</div><div class="MsoNormal">4. Now click tab called import and browse respective CSV, </div><div class="MsoNormal"> Set utf8 as character set of the file,</div><div class="MsoNormal"><span class="txtplain1"> Tick "Allow interrupt of import in case script detects it is close to time limit." This might be good way to import large files; however it can break transactions, </span></div><div class="MsoNormal"><span class="txtplain1">Number of records (queries) to skip from start: 1 (because one row in excel you already written as headings in mysql database’s table so we don’t need that first row).</span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal">When come to Format of imported file, tick CSV with LOAD data and again in that unpick Replace table data with file, Ignore duplicate rows </div><div class="MsoNormal"><br />
</div><div class="MsoNormal">Fields terminated by: “,” (change it to comma or leave it as it is check once which is suitable for you), </div><div class="western" style="margin-bottom: 0.0001pt;">Fields enclosed by, Fields escaped by change it to empty or blank it.</div><div class="western" style="margin-bottom: 0.0001pt;">Lines terminated by to auto, Column names change it to empty or blank it.</div><div class="western" style="margin-bottom: 0.0001pt;">Finally, tick Use LOCAL keyword and click button called GO that’s it. </div><div class="MsoNormal"><br />
</div><div class="MsoNormal">Important issues:</div><div class="MsoNormal"><br />
</div><div class="MsoNormal">Whenever you save as excel data to CSV it will ask u that name already exist its better to save with some other name so that your previous data will be safe at least if you done any thing wrong. One more thing and it also ask that “selected work file types does not support workbooks that contain multiple sheets” just say ok and again it comes with another txt message just say yes. Now your data is in CSV format.</div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><br />
</div><div class="western" style="margin-bottom: 0.0001pt;"><b>For any queries contact me via below respective comment box.</b></div><div class="MsoNormal"><br />
</div></div></div>Mohiddinhttp://www.blogger.com/profile/03610678833214736380noreply@blogger.com1tag:blogger.com,1999:blog-1414356926793170092.post-78552693985258240662010-10-21T00:40:00.000-07:002010-10-21T00:44:14.954-07:00Brief description of AjaxAjax is Asynchronous process with combination of JavaScript and Xml. It is a magical tool because the process is done within seconds. The main reason for using Ajax is to avoid burden on server. Hence it is a major rule for every programmer and web designer. The main difference between normal page and a page with Ajax come to real time is, in normal the whole page is loaded when action is called, where as in Ajax page particular section is loaded not a whole page. <br />
<br />
<a name='more'></a><br />
<br />
When come to brief description of Ajax, the process beyond is takes place with two steps that is as follows:<br />
<br />
1. Browser to Server.<br />
<br />
2. Server to Browser.<br />
<br />
1. Browser to Server:<br />
In this, XMLHttpRequest object is created and sends this http request to server and in the server that particular http request is processed and again it sends backs to the browser.<br />
<br />
2. Server to Browser.<br />
With continuation of above point, the returned data is processed with JavaScript and in result the data is updated in the webpage.<br />
<br />
Coding Action:<br />
Function called for http request process and again that resulted data process with JavaScript.<br />
<br />
Over to you.Mohiddinhttp://www.blogger.com/profile/03610678833214736380noreply@blogger.com0tag:blogger.com,1999:blog-1414356926793170092.post-16755135995376342852010-01-17T21:17:00.000-08:002010-10-19T04:12:00.735-07:00How to connect a database in Php Connecting the database in Php plays an important role. As I already mentioned in my previous article called <a href="http://checkboxesinphp.blogspot.com/2009/12/introduction-to-php.html">introduction to php</a> that connecting database comes under the categories of Dynamic. Mean while these connections are performed in two ways and the first one with example is as follows:-<br />
<br />
<? <br />
……………………………….<br />
<a name='more'></a><br />
<br />
…………………………………..<br />
<br />
……………………………………………….<br />
<br />
<br />
<br />
mysql_connect("localhost","root","");<br />
<br />
mysql_select_db("school");<br />
<br />
……………………………….<br />
<br />
…………………………………..<br />
<br />
……………………………………………….<br />
<br />
<br />
<br />
<br />
?><br />
<br />
As you see in above example that there is no chance of visible of the database details. That means it is secure. Thus connections are made easy in Php.<br />
<br />
As you see in the above example the database name is clearly visible. That means there is chance for “hackers” for malfunctioning of the database. So today many programmers don’t follow this method. When come to the second one here the details of database connection are kept in some dbconnection.php and that dbconnection.php is include in eachpage.php where database connection is necessary and the basic syntax for that is as follows:-<br />
<br />
<? <br />
……………………………….<br />
…………………………………..<br />
……………………………………………….<br />
include "dbconnection.php";<br />
………………………………………………<br />
…………………………………………….<br />
<br />
?><br />
As you see in above example that there is no chance of visible of the database details. That means it is secure. Thus connections are made easy in Php.<br />
The minor towers next to the citizen.Mohiddinhttp://www.blogger.com/profile/03610678833214736380noreply@blogger.com2tag:blogger.com,1999:blog-1414356926793170092.post-78470582108035100542010-01-08T20:36:00.001-08:002010-10-19T04:17:05.094-07:00what is Traffic As you know how a traffic is important for a website. Through traffic only a website becomes most popular in the same time your site status/ your business also improved. Mean while here I am explaining about Traffic and I am shore in my next post I will bring you lot of directories, links, search engines, techniques and much more that helps for increasing a traffic for a Website.<br />
<br />
Here I am explaining some important points that is minimum need for a website to increase traffic. When ever a site is completed the first point is you have to Index your website to <a href="http://www.google.co.in/">Google</a>, because <br />
<a name='more'></a>according to Alexa rank the no. one search engine is Google.<br />
<br />
You people can ask what Alexa is; Alexa is a most popular website the main theme of this website is providing rank w.r.t Traffic. If you want to check the rank of particular website simply go to the <a href="http://www.alexa.com/">Alexa</a> enter URL of a site and you can see the rank of that site. Mean while come to the point Indexing is nothing but the each navigation/a post that you have written in your site that can be displayed through search engine if a user types some matter that related to your website. Hence this can be done if Your URL is claimed in ”Webmaster Tools” for other it can be done through “meta” tags.<br />
<br />
Some experts say that if your site is indexed with <a href="http://www.google.co.in/">Google</a> in the same time it is also indexed with other search engines too. Mean while our responsible is to submit your site to no. of search engines another one is link exchange it is nothing but exchanging the links between the websites that’s also helps us to increase the traffic. Today social networking sites also plays wonderful role to increase traffic for a website.<br />
<br />
Generation to Generation in the internet, increasing traffic to a website becomes business that some companies taking responsibilities to increase traffic for a website by some charge. One of the important advantage of traffic is you can earn some money by publishing some ads in your web site and these ads today offering so many companies in that Google is no. one. So you people don’t miss my upcoming post in that I am bringing you lot of stuff that helps you to increase the traffic.<br />
<br />
2XJTXSD3JD47Mohiddinhttp://www.blogger.com/profile/03610678833214736380noreply@blogger.com2tag:blogger.com,1999:blog-1414356926793170092.post-10861326343580255622010-01-02T02:25:00.000-08:002012-02-21T21:50:05.902-08:00Important links of Php for developing a website<div dir="ltr" style="text-align: left;" trbidi="on">
As I all ready explained in my previous posts that about Php. Here again I came for you with few points that helps you developing a complete/perfect website in Php. The basic points here I am concentrating that as follows:-<br />
<br />
1. What is the best editor for developing a Php website?<br />
2. What are the important links for developing a Php web site?<br />
3. How to search in Search Engines for particular codes or something else to get the solutions?<br />
<a name='more'></a><br />
4. How to get a best CSS?<br />
5. Where to execute at each time when developing a website?<br />
<br />
And the answers as follows for Important links of Php for developing a website, <br />
<br />
For editing I always prefer for Dreamweaver. Dreamweaver is a software where you can write your code in easy manner because the basic page itself in Dreamweaver again part ion into 3 parts i.e. first one is Code here you can write a code, second one is Design here you can see the structure that what was written in the Code and third one is Split here you can see 1 and 2 at the same time. One of the advantage is here CSS is automatically generated when you go through the page properties.<br />
<br />
When coming to the second question I have some collection of important links for developing a Php website. Through these links you easily get the navigation buttons, free templates, java scripts and much more. The Important links of Php for developing a website are as follows.<br />
<a href="http://www.php.net/">www.Php.net</a><br />
<a href="http://www.w3schools.com/">www.w3schools.com</a><br />
<a href="http://www.dynamicdrive.com/">www.dynamicdrive.com</a><br />
<a href="http://www.cssmenumaker.com/">www.cssmenumaker.com</a><br />
<a href="http://www.13styles.com/">www.13styles.com</a><br />
<a href="http://www.free-css.com/">www.free-css.com</a><br />
<a href="http://www.javascript.com/">www.javascript.com</a><br />
<a href="http://www.webcheatsheet.com/">www.webcheatsheet.com</a><br />
<a href="http://www.hotscripts.com/">www.hotscripts.com</a><br />
<a href="http://www.freephptemplates.com/">www.freephptemplates.com</a><br />
<a href="http://www.stylesheet.com/">www.stylesheet.com</a><br />
<a href="http://www.freewebtemplates.com/">www.freewebtemplates.com</a><br />
<a href="http://www.freethemebase.com/">www.freethemebase.com</a><br />
<a href="http://www.freelayouts.com/">www.freelayouts.com</a><br />
http://freevectors.com<br />
<br />
When coming to the third question, today searching becomes very easy when we go through the search engines and in Present generation I am shore that 99% of people getting help through these search engines for completion of their project work. As I mention in the first line in this paragraph that “today searching becomes very easy” why because Internet is a place which contains no. of links related with each and each domain that’s why some people called this as a Web, a Spider Web. Mean while if you want a source code or a JavaScript or some thing else simply open a search engine (Google, Ask, Yahoo….) type the matter that what was going in your mind and to get the best result the sentence not more than five to six words.<br />
<br />
When coming to the fourth question, CSS is needed when, if you want go to design a website by own. For beginners I always supports go to the free templates select one of them, copy their CSS, try to edit them and see what happens and apply for your template. If you follow these words you definitely become a CSS expert in future and I am shore you can write CSS by own.<br />
<br />
When coming to the fifth question, when you developing a website my kindly suggestion is execute the each page in different browsers (Internet explorer. Google chrome. Fire fox…) before uploading them. Because your page varies from browser to browser so make adjustments.</div>Mohiddinhttp://www.blogger.com/profile/03610678833214736380noreply@blogger.com4tag:blogger.com,1999:blog-1414356926793170092.post-28985820692554418262009-12-29T06:06:00.000-08:002010-10-19T04:24:08.804-07:00Why to choose Php In those days as you see so many platforms are available such as Java, Asp.Net and so on... for developing a site or for software. Meanwhile each platform has its own capability and a particular weight, Then our question is why to choose Php, and the answer is very simple. Php is a type of platform that is mostly relevant for making websites in easy manner. You people can ask website design is also possible in Asp.net then why to choose Php, as it is true on both the sides meanwhile when you come to Asp.net all most all the sites are dynamic sites. Up to the mostly website designing is similar to Php, but when time of launching they have to purchase a software, which is very expensive in the result the projects made in Asp.Net is very<br />
<a name='more'></a> costly for the client where as in Php the website design is also done similar to remaining platforms, but at the time of hosting here no need to purchase any platform even for uploading mostly we use Filezilla. The software, which is used in Php is free software that is easily downloaded from a Php resource: <a href="http://www.php.net/">http://www.php.net</a>.That means no need to purchase any software no need to take any rights simply purchase the domain upload the file as you created and stay cool. <br />
<br />
One of the important point that we concentrate here was, when doing these sites before uploading them in their respective domains we execute each of them that was running properly or not. As in <span class="ver" title="There should be a space at the beginning of the sentence.">Asp.N</span>et it is done using Visual Studio <span class="verupdated" hptip="Either use a comma before <i>which</i> or replace it with the word <i>that</i>." title="">editions, which is</span> expensive for a database we use here Sqlserver <span class="verupdated" hptip="Either use a comma before <i>which</i> or replace it with the word <i>that</i>." title="">editions, which is</span> each separate both are expensive again. But <span class="verupdated" hptip="You probably need to add a subject, e.g.: <i>If <b>you</b> receive ...</i>" title="">if you come</span> to Php we install software called <span class="verupdated" hptip="Either use a comma before <i>which</i> or replace it with the word <i>that</i>." title="">Xampp, which is</span> free software no need purchase you can simply download from the net. <span class="verupdated" hptip="The noun should probably be plural (without an apostrophe, unless indicating possession), e.g.: <i>several girl<b>s</b></i>." title="">One of the advantages</span> of the Xampp is it includes Mysql database simply create Database, tables and <span class="verupdated" hptip="This expression is usually written as one word, e.g.: <i>wit<b>ho</b>ut</i>, <i>bo<b>yf</b>riend</i>, <i>straigh<b>tf</b>orward</i>, etc." title="">whatever</span> you like related to that. <span class="verupdated" hptip="You probably need to use an <i>-ing</i> form of the verb, e.g.: <i>Be careful when <b>driving</b> on the highway</i>. " title="">When coming</span> to the execution point of view go to your respective browser open with local host then simply execute your page<span class="verupdated" hptip="This expression is usually followed by a comma when it is used at the beginning of a sentence." title="">, Here</span> for Database type http://localhost/phpmyadmin and for page execution http://localhost/school/index<span class="ver" hptip="There should be a space at the beginning of the sentence." title="">.php that</span>'s it no need to worry about. Another important point is as you people know basically websites are classified into two types <span class="verupdated" hptip="There should be a space at the beginning of the sentence." title="">1. S</span>tatic (without database) and <span class="verupdated" hptip="There should be a space at the beginning of the sentence." title="">2. D</span>ynamic (with database). For much cheaper Static sites must follow Php/html rather than other as for Dynamic I already said. <br />
<br />
Today so many people prefer Php only because it is a user- friendly and the almost all coding written in "C" statements and functions. The person who wants to learn Php he just has minimum idea on Html. If you don't know simply go to the W3C schools <a href="http://www.w3schools.com/">http://www.w3schools.com</a>, which is an wonderful site you can easily learn from that and for designing purpose go to the site <a href="http://www.dynamicdrive.com/">http://www.dynamicdrive.com</a> enough if you follow these two sites I am shore you are 99% perfect for doing Php sites. For more details refer <a href="http://checkboxesinphp.blogspot.com/search/label/Introduction">introduction</a>. These are some important points why to choose Php rather than other. <br />
<br />
GOOD LUCK.Mohiddinhttp://www.blogger.com/profile/03610678833214736380noreply@blogger.com0tag:blogger.com,1999:blog-1414356926793170092.post-3869360263144798512009-12-28T06:03:00.000-08:002010-10-19T04:45:07.254-07:00Source Code for Paginations in Php Here again I am introducing one of the important code called Source Code for Paginations in Php. Before discussing about Source Code for Paginations in Php, Here we have to know first what Paginations is so that we can understand clearly about this code.<br />
<br />
Ok, here I am discussing with small example when you guys go the search engines called Google, Yahoo or some thing else you type some matter in that box and when you click the search button<br />
<a name='more'></a> definitely no. of results displayed . I am shore these results in thousands or in much more but in your browser <br />
at a time 10 -15 displayed and remaining displayed with paginations buttons followed in each bottom of the page and I think you guys understood about the paginations. So why can’t we apply this type of code to our dynamic sites.<br />
Mean while when come to the technical part when we write a code for the “Search Button” definitely we use a query in Mysql called “Select” w.r.t this we use paginations code. Hence Source Code For Paginations In Php is as follows :-<br />
<br />
<br />
<div style="height: 500px; overflow: auto; padding: 5px; width: 480px;"><?<br />
include "dbconnect.php"; <br />
<br />
//Code for pagination<br />
$tbl_name="Your_Table_Name"; //here enter your table name.<br />
$adjacents = 3;<br />
$query ="SELECT count(*) as num FROM $tbl_name";<br />
//echo $query;<br />
$query1=mysql_num_rows(mysql_query($query));<br />
//echo $query1;<br />
$total_pages = mysql_fetch_array(mysql_query($query));<br />
//echo $total_pages[num];<br />
$total_pages = $total_pages[num];<br />
//echo $total_pages;<br />
$targetpage = "display_page.php"; <br />
$limit = 5; //here enter your limit <br />
$page = $_GET['page'];<br />
//echo $page;<br />
if($page) $start = ($page - 1) * $limit; <br />
else $start = 0; <br />
$sql = "SELECT * FROM $tbl_name ORDER BY `n_id` DESC LIMIT $start, $limit";<br />
//echo $sql;<br />
$result = mysql_query($sql);<br />
//echo $result['bname'];<br />
if ($page == 0) $page = 1; <br />
$prev = $page - 1; <br />
$next = $page + 1; <br />
$lastpage = ceil($total_pages/$limit); <br />
$lpm1 = $lastpage - 1; <br />
$pagination = "";<br />
if($lastpage > 1)<br />
{ <br />
$pagination .= "<div class=\"pagination\">";<br />
if ($page > 1) <br />
$pagination.= "«<a href=\"$targetpage?page=$prev\">previous</a>&nbsp;";<br />
else<br />
$pagination.= "«<span class=\"disabled\">previous</span>&nbsp;"; <br />
if ($lastpage < 7 + ($adjacents * 2)) <br />
{ <br />
for ($counter = 1; $counter <= $lastpage; $counter++)<br />
{<br />
if ($counter == $page)<br />
$pagination.= "<span class=\"current\">$counter</span>&nbsp;&nbsp;";<br />
else<br />
$pagination.= "<a href=\"$targetpage?page=$counter\">$counter</a>&nbsp;&nbsp;"; <br />
}<br />
}<br />
elseif($lastpage > 5 + ($adjacents * 2)) <br />
{<br />
if($page < 1 + ($adjacents * 2)) <br />
{<br />
for ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++)<br />
{<br />
if ($counter == $page)<br />
$pagination.= "<span class=\"current\">$counter</span>";<br />
else<br />
$pagination.= "<a href=\"$targetpage?page=$counter\">$counter</a>"; <br />
}<br />
$pagination.= "...";<br />
$pagination.= "<a href=\"$targetpage?page=$lpm1\">$lpm1</a>";<br />
$pagination.= "<a href=\"$targetpage?page=$lastpage\">$lastpage</a>"; <br />
}<br />
elseif($lastpage - ($adjacents * 2) > $page && $page > ($adjacents * 2))<br />
{<br />
$pagination.= "<a href=\"$targetpage?page=1\">1</a>";<br />
echo ' ';<br />
$pagination.= "<a href=\"$targetpage?page=2\">2</a>";<br />
$pagination.= "...";<br />
for ($counter = $page - $adjacents; $counter <= $page + $adjacents; $counter++)<br />
{<br />
if ($counter == $page)<br />
$pagination.= "<span class=\"current\">$counter</span>";<br />
else<br />
$pagination.= "<a href=\"$targetpage?page=$counter\">$counter</a>"; <br />
}<br />
$pagination.= "...";<br />
$pagination.= "<a href=\"$targetpage?page=$lpm1\">$lpm1</a>";<br />
$pagination.= "<a href=\"$targetpage?page=$lastpage\">$lastpage</a>"; <br />
}<br />
else<br />
{<br />
$pagination.= "<a href=\"$targetpage?page=1\">1</a>";<br />
$pagination.= "<a href=\"$targetpage?page=2\">2</a>";<br />
$pagination.= "...";<br />
for ($counter = $lastpage - (2 + ($adjacents * 2)); $counter <= $lastpage; $counter++)<br />
{<br />
if ($counter == $page)<br />
$pagination.= "<span class=\"current\">$counter</span>";<br />
else<br />
$pagination.= "<a href=\"$targetpage?page=$counter\">$counter</a>"; <br />
}<br />
}<br />
}<br />
if ($page < $counter - 1) <br />
$pagination.= "&nbsp;<a href=\"$targetpage?page=$next\">next</a> »";<br />
else<br />
$pagination.= "&nbsp;<span class=\"disabled\"> next</span> »";<br />
$pagination.= "</div>\n"; <br />
} <br />
?></div>Mohiddinhttp://www.blogger.com/profile/03610678833214736380noreply@blogger.com0tag:blogger.com,1999:blog-1414356926793170092.post-77717582067434643702009-12-27T10:07:00.000-08:002010-10-19T04:31:46.585-07:00Example for pagination in Php As I already mentioned the code in my topics called <a href="http://checkboxesinphp.blogspot.com/search/label/Codings">Codings.</a> For more details about paginations visit <a href="http://checkboxesinphp.blogspot.com/2009/12/source-code-for-paginations-in-php.html">Source code for paginations in Php</a> in this Blog. Mean while here I am introducing an Example for pagination in Php with a small topic taken from my past project page. Change the table name, no. of pages display for each page, database connection name and so on…<br />
<br />
Hence here is your code for pagination in Php with example i.e. is as follows written in two steps:-<br />
<a name='more'></a><br />
<br />
<b>Step1</b>: Paste the code in the beginning of the page.<br />
<div style="height: 300px; overflow: auto; padding: 5px; width: 480px;"><br />
<?<br />
include "dbconnect.php";<br />
<br />
$tbl_name="news";<br />
$adjacents = 3;<br />
$query ="SELECT count(*) as num FROM $tbl_name";<br />
//echo $query;<br />
$query1=mysql_num_rows(mysql_query($query));<br />
//echo $query1;<br />
$total_pages = mysql_fetch_array(mysql_query($query));<br />
//echo $total_pages[num];<br />
$total_pages = $total_pages[num];<br />
//echo $total_pages;<br />
$targetpage = "news_list.php";<br />
$limit = 5; <br />
$page = $_GET['page'];<br />
//echo $page;<br />
if($page) $start = ($page - 1) * $limit;<br />
else $start = 0; <br />
$sql = "SELECT * FROM $tbl_name ORDER BY `n_id` DESC LIMIT $start, $limit";<br />
//echo $sql;<br />
$result = mysql_query($sql);<br />
//echo $result['bname'];<br />
if ($page == 0) $page = 1; <br />
$prev = $page - 1;<br />
$next = $page + 1; <br />
$lastpage = ceil($total_pages/$limit);<br />
$lpm1 = $lastpage - 1; <br />
$pagination = "";<br />
if($lastpage > 1)<br />
{<br />
$pagination .= "<div class=\"pagination\">";<br />
if ($page > 1)<br />
$pagination.= "«<a href=\"$targetpage?page=$prev\">previous</a>&nbsp;";<br />
else<br />
$pagination.= "«<span class=\"disabled\">previous</span>&nbsp;";<br />
if ($lastpage < 7 + ($adjacents * 2))<br />
{<br />
for ($counter = 1; $counter <= $lastpage; $counter++)<br />
{<br />
if ($counter == $page)<br />
$pagination.= "<span class=\"current\">$counter</span>&nbsp;&nbsp;";<br />
else<br />
$pagination.= "<a href=\"$targetpage?page=$counter\">$counter</a>&nbsp;&nbsp;"; <br />
}<br />
}<br />
elseif($lastpage > 5 + ($adjacents * 2))<br />
{<br />
if($page < 1 + ($adjacents * 2))<br />
{<br />
for ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++)<br />
{<br />
if ($counter == $page)<br />
$pagination.= "<span class=\"current\">$counter</span>";<br />
else<br />
$pagination.= "<a href=\"$targetpage?page=$counter\">$counter</a>"; <br />
}<br />
$pagination.= "...";<br />
$pagination.= "<a href=\"$targetpage?page=$lpm1\">$lpm1</a>";<br />
$pagination.= "<a href=\"$targetpage?page=$lastpage\">$lastpage</a>";<br />
}<br />
elseif($lastpage - ($adjacents * 2) > $page && $page > ($adjacents * 2))<br />
{<br />
$pagination.= "<a href=\"$targetpage?page=1\">1</a>";<br />
echo ' ';<br />
$pagination.= "<a href=\"$targetpage?page=2\">2</a>";<br />
$pagination.= "...";<br />
for ($counter = $page - $adjacents; $counter <= $page + $adjacents; $counter++)<br />
{<br />
if ($counter == $page)<br />
$pagination.= "<span class=\"current\">$counter</span>";<br />
else<br />
$pagination.= "<a href=\"$targetpage?page=$counter\">$counter</a>"; <br />
}<br />
$pagination.= "...";<br />
$pagination.= "<a href=\"$targetpage?page=$lpm1\">$lpm1</a>";<br />
$pagination.= "<a href=\"$targetpage?page=$lastpage\">$lastpage</a>";<br />
}<br />
else<br />
{<br />
$pagination.= "<a href=\"$targetpage?page=1\">1</a>";<br />
$pagination.= "<a href=\"$targetpage?page=2\">2</a>";<br />
$pagination.= "...";<br />
for ($counter = $lastpage - (2 + ($adjacents * 2)); $counter <= $lastpage; $counter++)<br />
{<br />
if ($counter == $page)<br />
$pagination.= "<span class=\"current\">$counter</span>";<br />
else<br />
$pagination.= "<a href=\"$targetpage?page=$counter\">$counter</a>"; <br />
}<br />
}<br />
}<br />
if ($page < $counter - 1)<br />
$pagination.= "&nbsp;<a href=\"$targetpage?page=$next\">next</a> »";<br />
else<br />
$pagination.= "&nbsp;<span class=\"disabled\"> next</span> »";<br />
$pagination.= "</div>\n";<br />
}<br />
?></div><br />
<b>Step2</b>: Paste the code with continues to step1 or after following to step1.<br />
<div style="height: 400px; overflow: auto; padding: 5px; width: 480px;"><br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br />
<html xmlns="http://www.w3.org/1999/xhtml"><br />
<head><br />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><br />
<title>:: Welcome To Checkboxesinphp ::</title><br />
<link href="style.css" rel="stylesheet" type="text/css" /><br />
<link href="my.css" rel="stylesheet" type="text/css" /><br />
<style type="text/css"><br />
.style18 {color: #660033}<br />
.style24 {font-weight: bold; font-family: Verdana, Arial, Helvetica, sans-serif; color: #660000;}<br />
.style25 {color: #4D6DF4}<br />
</style><br />
</head><br />
<br />
<body><br />
<table width="801" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#000099"><br />
<tr><br />
<td valign="top"><table width="800" border="0" align="center" cellpadding="0" cellspacing="0"><br />
<tr><br />
<td><? include"header.php";?></td><br />
</tr><br />
<tr><br />
<td bgcolor="#FFFFFF"><? include"menulinks.php";?></td><br />
</tr><br />
<tr><br />
<td height="300" valign="top" bgcolor="#FFFFFF"><table width="100%" height="99%" border="0" align="center" cellpadding="0" cellspacing="0"><br />
<tr><br />
<td valign="top"><br />
<table width="99%" align="center" cellpadding="0" cellspacing="0"><br />
<tr><br />
<td height="1">&nbsp;</td><br />
</tr><br />
<form method="post" name="login" id="login" onsubmit="return check()"><br />
<tr><br />
<td><div align="center" class="subcon"><br />
<p>&nbsp;</p><br />
<h3 class="heading style25">ALL NEWS LIST </h3><br />
<table width="73%" height="140" border="0" cellpadding="0" cellspacing="0"><br />
<tr><br />
<th width="45%" height="32" scope="col"><span class="style25">TITLE</span></th><br />
<th width="33%" scope="col"><span class="style25">EDIT NEWS </span></th><br />
<th width="33%" scope="col"><span class="style25">DELETE NEWS </span></th><br />
</tr><br />
<?php<br />
<br />
$num=mysql_num_rows($result);<br />
<br />
if($num=='')<br />
{<br />
?><br />
<tr><br />
<td colspan="10" align="center"><div align="center"><? echo "no records found"; ?></div></td><br />
</tr><br />
<?<br />
}<br />
else<br />
{<br />
while($fel=mysql_fetch_array($result))<br />
{<br />
<br />
?><br />
<tr><br />
<td><div align="center"><strong class="style24"><br />
<?=$fel['title']?><br />
</strong></div></td><br />
<td><div align="center"><a href="news_edit.php?id=<?=$fel['n_id']?>"><img src="images/b_edit.png" border="0" width="16" height="16"/></a>&nbsp;&nbsp;<font color="#660033">&nbsp;<strong class="style18">EDIT</strong></font></div></td><br />
<td width="22%"><div align="center"><a href="news_del.php?id=<?=$fel['n_id']?>"><img src="images/b_drop.png" border="0" /></a>&nbsp;<strong><span class="style18">&nbsp;DELETE</span></strong></div></td><br />
</tr><br />
<tr><br />
<td colspan="10" align="center">&nbsp;</td><br />
</tr><br />
<? }<br />
?><br />
<h3 align="right"><br />
<?=$pagination?><br />
</h3><br />
<? }?><br />
<!--<tr><br />
<td colspan="10" align="center">&nbsp;</td><br />
</tr>--><br />
</table><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
</div></td><br />
</tr></form><br />
</table></td><br />
</tr><br />
</table></td><br />
</tr><br />
<tr><br />
<td bgcolor="#FFFFFF">&nbsp;</td><br />
</tr><br />
<tr><br />
<td><? include"footer.php";?></td><br />
</tr><br />
</table></td><br />
</tr><br />
</table><br />
</body><br />
</html></div>Mohiddinhttp://www.blogger.com/profile/03610678833214736380noreply@blogger.com0tag:blogger.com,1999:blog-1414356926793170092.post-70244651581171778852009-12-23T03:46:00.000-08:002010-10-19T04:41:04.171-07:00Example for contact in Php As I already mention the source code in a <span class="spellmod" title="Spelling error - suggestions: categories, categorise, categorize, category">categorie</span> called Codings, Here I am displaying the entire page <span class="verupdated" hptip="One usually writes <i>what</i> in this context, e.g.: <i>I know <b>what</b> it looks like</i>." title="">that how it looks like</span> in coding page who not understand there meanwhile you simply copy the code and paste in your page and make changes where I am written text as "YOUR <span class="ver" hptip="Most style-guides suggest that the comma should come before the quotation mark." title="">COMPANY NAME",</span>"MAILID" and so on. I have confident <span class="ver" hptip="This is common is some forms of spoken English. However, when writing, we suggest you remove the word <i>guys</i>." title="">you guys</span> definitely understood and the source code as follows copy and paste presented below two steps- <br />
<br />
<b>Step1:-<a name='more'></a></b><br />
<br />
<div style="height: 300px; overflow: auto; padding: 5px; width: 480px;"><br />
<div id="center_col"><div id="contentscroll2"><!--Step1 --><br />
<?<br />
if($_POST['Submit']=='Submit')<br />
{<br />
<br />
extract ($_POST);<br />
<br />
//user mail<br />
$sendTo = $email;<br />
<br />
$subject = "Sub :Thank you";<br />
$headers = 'MIME-Version: 1.0' . "\r\n";<br />
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";<br />
$headers .= 'From: YOUR COMPANY NAME <contact@YOURDOMAINNAME.COM>';<br />
$message = "<html><head></head><body><font-style:italic; color:#FF0099> Dear ".$_POST['name'].", <br><br><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Thanks for your interest........... YOUR COMPLIMENTS CONTINUES HERE. We have received all your details and we will contact you at the earliest. <BR><br> CONTINUE YOUR SUBJECT .<br><br>";<br />
$message = $message."Thanks & Regards.<br>----------------------------<br>NAME,<br>YOURS SCINCEARLY<br>YOUR COMPANY NAME<br><br />
www.YOUR COMPANY NAME.com</body></html>";<br />
//$from = "YOUR COMPANY NAME";<br />
@mail($sendTo, $subject, $message, $headers);<br />
<br />
<br />
//admin mail<br />
//$sendTo_a = "contact@YOURDOMAINNAME.COM";<br />
$sendTo_a = "ADMINID@gmail.com";<br />
$subject_a = "Sub :Student Enrole Form";<br />
$headers_a = 'MIME-Version: 1.0' . "\r\n";<br />
$headers_a .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";<br />
$headers_a .= 'From:'.$name.'<'. $email.'>';<br />
<br />
$message_a = "<html><head></head><body>".$_POST['name'].", <br />
is Register as in your www.YOUR COMPANY NAME.com<br>".<br />
<br />
"<table width='83%' bgcolor=#EFF8F8 border='0' align='center' cellspacing='0' cellpadding='5'><br />
<tr><br />
<td width='30%'>Name</td><br />
<td width='5%'>:</td><br />
<td width='45%'>$name</td><br />
</tr><br />
<tr><br />
<td>Email Id</td><br />
<td>:</td><br />
<td>$email</td><br />
</tr><br />
<tr><br />
<td>Contact Number</td><br />
<td>:</td><br />
<td>$number</td><br />
</tr><br />
<tr><br />
<td>Qualification</td><br />
<td>:</td><br />
<td>$quali</td><br />
</tr><br />
<tr><br />
<td>Prefer Timings</td><br />
<td>:</td><br />
<td>$sel</td><br />
</tr><br />
</table><br />
<br />
</body></html><br />
<br> ";<br />
<br />
@mail($sendTo_a, $subject_a, $message_a, $headers_a);<br />
//end admin mail<br />
echo "<script>";<br />
echo "location.replace('YOUR NEXT PAGE.php')";<br />
echo "</script>";<br />
}<br />
<br />
?></div></div></div><br />
<b>Step2:-</b><br />
<br />
<div style="height: 500px; overflow: auto; padding: 5px; width: 480px;"><div id="center_col"><div id="contentscroll2"><!--Step2 --><br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br />
<html xmlns="http://www.w3.org/1999/xhtml"><br />
<head><br />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><br />
<title>YOUR COMPANY TITLE</title><br />
<link href="style.css" rel="stylesheet" type="text/css" /><br />
<style type="text/css"><br />
<!--<br />
.style6 {color: #5490CC; font-weight: bold; }<br />
.style7 {color: #5490CC}<br />
.style11 {color: #5490CC;}<br />
.style12 {color: #FFFFFF}<br />
--><br />
</style><br />
</head><br />
<br />
<body><br />
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#000000"><br />
<tr><br />
<td valign="top"><table width="800" border="0" align="center" cellpadding="0" cellspacing="0"><br />
<tr><br />
<td align="left"><? include "header.php";?></td><br />
</tr><br />
<tr><br />
<td height="300" valign="top" ><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"><br />
<tr><br />
<td valign="top" align="center">&nbsp;</td><br />
<td><table width="100%" border="0" cellspacing="0" cellpadding="0"><br />
<tr><br />
<td width="3%">&nbsp;</td><br />
<td width="97%"><? include "menu.php";?></td><br />
</tr><br />
</table></td><br />
</tr><br />
<tr><br />
<td width="9%" valign="top" align="left"><? include "leftmenu.php";?></td><br />
<td width="91%"><table width="98%" border="0" cellspacing="0" cellpadding="0"><br />
<tr><br />
<td width="67"><img src="images/images/b1.jpg" width="67" height="59" /></td><br />
<td width="505" class="m_button1">&nbsp;</td><br />
<td width="88"><img src="images/images/b3.jpg" width="67" height="59" /></td><br />
</tr><br />
<tr><br />
<td class="left_menu">&nbsp;</td><br />
<td><table width="96%" cellspacing="0" cellpadding="0"><br />
<tr><br />
<td><span class="style6 style7">Enrol NOW </span></td><br />
</tr><br />
<tr><br />
<td><table width="96%" align="center" cellpadding="0" cellspacing="0"><br />
<tr><br />
<td height="70"><p>Do you want to speak fluent and confident English?<br /><br />
Do you want to experience the i3 approach to English...?<br /><br />
Do you want to leap towards a successful career...?<br /><br />
Are you interested to join Outleap Career Academy...? </p></td><br />
</tr><br />
</table></td><br />
</tr><br />
<!--<tr><br />
<td>&nbsp;</td><br />
</tr>--><br />
<tr><br />
<td><p class="style11"><strong>Give your details</strong></p><br />
<p>Give us your details and we will contact you at the earliest.</p></td><br />
</tr><br />
<tr><br />
<td><table width="96%" align="center" cellpadding="0" cellspacing="0"><br />
<tr><br />
<td><table width="70%" cellspacing="0" cellpadding="0"><br />
<tr><br />
<td width="38%">&nbsp;</td><br />
<td width="62%">&nbsp;</td><br />
</tr><br />
<form id="form1" name="form1" method="post" action=""><br />
<tr><br />
<td><span class="style11">Name</span></td><br />
<td><input name="name" type="text" id="name" /> </td><br />
</tr><br />
<tr><br />
<td>&nbsp;</td><br />
<td>&nbsp;</td><br />
</tr><br />
<tr><br />
<td><span class="style11">Email ID </span></td><br />
<td><input name="email" type="text" id="email" /></td><br />
</tr><br />
<tr><br />
<td>&nbsp;</td><br />
<td>&nbsp;</td><br />
</tr><br />
<tr><br />
<td><span class="style11">Contact Number </span></td><br />
<td><input name="number" type="text" id="number" /></td><br />
</tr><br />
<tr><br />
<td>&nbsp;</td><br />
<td>&nbsp;</td><br />
</tr><br />
<tr><br />
<td><span class="style11">Qualification</span></td><br />
<td><input name="quali" type="text" id="quali" /></td><br />
</tr><br />
<tr><br />
<td>&nbsp;</td><br />
<td>&nbsp;</td><br />
</tr><br />
<tr><br />
<td><span class="style11">Preferred Timing </span></td><br />
<td><select name="sel" id="sel"><br />
<option value="[ Select Timings ]">[ Select Timings ]</option><br />
<option value="07:00 am to 08:30 am">07:00 am to 08:30 am</option><br />
<option value="08:30 am to 10:00 am">08:30 am to 10:00 am</option><br />
<option value="10:30 am to 12:00 pm">10:30 am to 12:00 pm</option><br />
<option value="12:00 pm to 01:30 pm">12:00 pm to 01:30 pm</option><br />
<option value="04:00 pm to 05:30 pm">04:00 pm to 05:30 pm</option><br />
<option value="05:30 pm to 07:00 pm">05:30 pm to 07:00 pm</option><br />
<option value="07:30 pm to 09:00 pm">07:30 pm to 09:00 pm</option><br />
</select> </td><br />
</tr><br />
<tr><br />
<td>&nbsp;</td><br />
<td>&nbsp;</td><br />
</tr><br />
<tr><br />
<td colspan="2" align="center"><input type="submit" name="Submit" value="Submit" /> </td><br />
</tr><br />
</form><br />
<tr><br />
<td>&nbsp;</td><br />
<td>&nbsp;</td><br />
</tr><br />
</table></td><br />
</tr><br />
</table></td><br />
</tr><br />
<tr><br />
<td class="style11"><strong>Upload your resume Here...! ( </strong><span class="style12"> word format only</span><strong> ) </strong></td><br />
</tr><br />
<tr><br />
<td><input type="file" name="file" /></td><br />
</tr><br />
<tr><br />
<td>&nbsp;</td><br />
</tr><br />
</table></td><br />
<td class="right_menu">&nbsp;</td><br />
</tr><br />
<tr><br />
<td><img src="images/images/b6.jpg" width="67" height="59" /></td><br />
<td class="m_button2">&nbsp;</td><br />
<td><img src="images/images/b8.jpg" width="67" height="59" /></td><br />
</tr><br />
<br />
</table></td><br />
</tr><br />
<br />
</table></td><br />
</tr><br />
<!-- <tr><br />
<td>&nbsp;</td><br />
</tr>--><br />
<tr><br />
<td><? include"footer.php";?></td><br />
</tr><br />
</table></td><br />
</tr><br />
</table><br />
</body><br />
</html></div></div></div>Over to you.Mohiddinhttp://www.blogger.com/profile/03610678833214736380noreply@blogger.com0tag:blogger.com,1999:blog-1414356926793170092.post-32237966353888058672009-12-22T03:28:00.000-08:002010-10-19T04:43:21.155-07:00Php source codes for Contact In those days as you observer when you click "contact navigator" definitely a page will be opened, in that page you will see a form with some labels, <span class="spellmod" hptip="Spelling error - suggestions: text boxes, text-boxes, textbooks, textbook's, textbook, postboxes, dextrose's, postbox's" title="">textboxes</span> and so on...with mentioning you to, <br />
Enter your email id. <br />
Enter your name. <br />
Enter your contact no. <br />
Select the time and so on… <br />
<br />
<a name='more'></a><br />
<br />
When you fill the details you definitely get a reply with a subject and with some matter, as we received your mail and we contact you soon or just like some matter send to your mail Id. I think you got it what I am discussing here, OK meanwhile when coming to technical side what happens here the code is written in such a manner that, at the time when User clicks the submit button, here two actions <span class="mod" hptip="Expressions like <i>etc.</i>, <i>i.e.</i>, and <i>e.g.</i> should be preceded by a comma." title=""><span class="verupdated" hptip="Use an object form of the pronoun at the end of a sentence (<i>them, me, her, him, us</i>), e.g.: <i>Paula did it for <b>me</b></i>." title="">take place i.</span>e.</span> as follows:- <br />
<br />
First one is an email send to the admin with the details that what the user fill in the form. <br />
Second one is an email send to the user with compliments that company mentioned. <br />
<br />
Mean while Php source codes for Contact is as follows and a point to remember that it should be posted in the starting of the Php page and I hope this Php source codes for Contact definitely helpful for you. For more details redirect to <mini a="" blog="" i="" in="" mention="" my="" page="" project.="" projects="" single="" their=""></mini><br />
<div id="center_col"><br />
<br />
<div style="height: 500px; overflow: auto; padding: 5px; width: 480px;"><br />
<div id="contentscroll2"><? <br />
if($_POST['Submit']=='Submit') <br />
{ <br />
<br />
extract ($_POST); <br />
<br />
//user mail <br />
$sendTo = $email; <br />
<br />
$subject = "Sub :Thank you"; <br />
$headers = 'MIME-Version: 1.0' . "\r\n"; <br />
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; <br />
$headers .= 'From: YOUR COMPANY NAME <contact@YOURDOMAINNAME.COM>'; <br />
$message = "<html><head></head><body><font-style:italic; color:#FF0099> Dear ".$_POST['name'].", <br><br> <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Thanks for your interest........... YOUR COMPLIMENTS CONTINUES HERE. We have received all your details and we will contact you at the earliest. <BR><br> CONTINUE YOUR SUBJECT .<br><br>"; <br />
$message = $message."Thanks & Regards.<br>----------------------------<br>NAME,<br>YOURS SCINCEARLY<br>YOUR COMPANY NAME<br> <br />
www.YOUR COMPANY NAME.com</body></html>"; <br />
//$from = "YOUR COMPANY NAME"; <br />
@mail($sendTo, $subject, $message, $headers); <br />
<br />
<br />
//admin mail <br />
//$sendTo_a = "contact@YOURDOMAINNAME.COM"; <br />
$sendTo_a = "ADMINID@gmail.com"; <br />
$subject_a = "Sub :Student Enrole Form"; <br />
$headers_a = 'MIME-Version: 1.0' . "\r\n"; <br />
$headers_a .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; <br />
$headers_a .= 'From:'.$name.'<'. $email.'>'; <br />
<br />
$message_a = "<html><head></head><body>".$_POST['name'].", <br />
is Register as in your www.YOUR COMPANY NAME.com<br>". <br />
<br />
"<table width='83%' bgcolor=#EFF8F8 border='0' align='center' cellspacing='0' cellpadding='5'> <br />
<tr> <br />
<td width='30%'>Name</td> <br />
<td width='5%'>:</td> <br />
<td width='45%'>$name</td> <br />
</tr> <br />
<tr> <br />
<td>Email Id</td> <br />
<td>:</td> <br />
<td>$email</td> <br />
</tr> <br />
<tr> <br />
<td>Contact Number</td> <br />
<td>:</td> <br />
<td>$number</td> <br />
</tr> <br />
<tr> <br />
<td>Qualification</td> <br />
<td>:</td> <br />
<td>$quali</td> <br />
</tr> <br />
<tr> <br />
<td>Prefer Timings</td> <br />
<td>:</td> <br />
<td>$sel</td> <br />
</tr> <br />
</table> <br />
<br />
</body></html> <br />
<br> "; <br />
<br />
@mail($sendTo_a, $subject_a, $message_a, $headers_a); <br />
//end admin mail <br />
echo "<script>"; <br />
echo "location.replace('YOUR NEXT PAGE.php')"; <br />
echo "</script>"; <br />
} <br />
<br />
?> </div></div></div>Mohiddinhttp://www.blogger.com/profile/03610678833214736380noreply@blogger.com0tag:blogger.com,1999:blog-1414356926793170092.post-8593037388197030422009-12-21T22:24:00.000-08:002010-10-19T04:51:12.164-07:00Designing Tips in Php Designing Tips in Php are the tips which make your page in a simple and stylish manner. The person who is interested in designing he must start with his career with html. Html is a foundation for Php and <span class="ver" title="If you mean “in order to”, write <i>to</i>, e.g.: <i>They went there <b>to</b> visit their aunt</i>.">for form</span> designing. Through html the structure is made, but for stylish look we use CSS, CSS means Cascading Style Sheets, Hence these CSS are used in <span class="ver" title="If this is a new sentence, it should start with a capital letter.">.net</span> and other platforms too, Thus CSS plays a wonderful role in so many platforms. Meanwhile <span class="ver" hptip="You probably need to add a subject, e.g.: <i>If <b>you</b> receive ...</i>" title="">when come</span> to Php these CSS are written between the style tags under the head tags and the syntax is as follows:-<br />
<a name='more'></a><br />
<br />
<br />
<style type="text/css"><br />
--------;<br />
<br />
---------------;<br />
</style><br />
<br />
But in the most cases we integrate the CSS. You people can ask how it is integrated. <span class="spellver" hptip="Possible spelling error - suggestions: OK, OJ, Oak, Oik, KO, OKs, Pk, K, O, AK, UK, Ox, Wok, OE, OH, OR, Ck, Oh, Oi, Or, Ow, Wk, Bk, Gk, Mk, OB, OD, ON, OS, OT, Ob, Os, Oz, SK, Of, Om, On, Op" title="">Ok</span>, as I mentioned above syntax the styles what are written in between the Style tags are all written in one page (notepad/word document) and saves as ".<span class="spellmod" title="Spelling error - suggestions: Cass, cs's, cuss, Cs, cs, SS, C's, Cos, cos, CBS, CNS, CST, SSS, cps, USS, ass, Ca's, Cd's, S's, Sc's, Co's, Cu's, Cb's, Cf's, Cl's, Cm's, Cr's, Ct's, Ch's, Cy's, Os's">css</span>" file. Now your CSS file is ready you can include that wherever you need the CSS and the syntax is as follows:- <br />
<br />
<br />
<head><br />
<br />
----<br />
<br />
<link href="cashierstyle.css" rel="stylesheet" type="text/css"/><br />
<br />
----<br />
<br />
</head><br />
FAQ:-<br />
What Points to be remember to become a perfect designer?<br />
<br />
Answer. Here I am suggesting some points for the beginners that are as follows:-<br />
<br />
1. Start designing with HTML. <br />
2. Add CSS of the other websites to your page and see the difference by editing the style in that CSS. <br />
3. Editing of CSS makes you a perfect designer at some part. <br />
4. In so many cases the combination of CSS and JavaScript impresses your page to a peak levels for the visitors and also for you. <br />
5. There are so many websites are available that makes your page stylish one of them is www.dynamicdrives.com <span class="ver" hptip="Please check: <i>he<b>re</b></i> (location) or <i>he<b>ar</b></i> (“listen”)." title="">here you</span> get almost stuff to your page. <br />
6. The people who are confused with CSS I suggest that you go to <span class="spellmod" title="Spelling error - suggestions: dream weaver, dream-weaver, dreamer, reweave, dreamier, dreamers, drawer, dreamiest, remover, dreamed, tramway, dreamboat, dreamless, tramways, drawers, dreams, dreamt, dreamer's, dream, tramway's, dream's, dreamworld, Traver, Trever, dreamy, remove, rewove, drummer, drawer's">dreamweaver</span> simply design the form there, below you can see the toolbar which contains <span class="ver" title="New sentences usually begin with a capital letter.">no. of</span> styles for your current page apply them and also in that toolbar you see another button called "page properties" go through their make some changes as you like and apply them, then your CSS automatically appeared in between the head tags that's it no tension at all.<br />
<br />
These are some of the Designing Tips in Php that makes you stronger. I hope it will helpful for you guys.Mohiddinhttp://www.blogger.com/profile/03610678833214736380noreply@blogger.com0tag:blogger.com,1999:blog-1414356926793170092.post-40940922483489481432009-12-20T17:39:00.000-08:002010-10-19T04:57:59.149-07:00Validations in Php for a Checkbox Validations in Php for Checkbox here why I am specifying the particular word because my friends ask me it is not possible as you given validation is not running if the more than 2 or 3 checkboxes are used in a form. Hence it is simple as I already tried when I am doing my assignments in html before I am learning the Php. Mean while the code as follows ,hopes it will helpful for you.<br />
<br />
<a name='more'></a><br />
<br />
<script><br />
<br />
function validate_checkbox ( )<br />
<br />
{<br />
<br />
valid = true;<br />
<br />
if ( document.f1.installment_1.checked == false && document.f1.installment_2.checked == false && document.f1.installment_3.checked == false && document.f1.installment_4.checked == false )<br />
<br />
{<br />
<br />
alert ( "Please check one of the term" );<br />
<br />
valid = false;<br />
}<br />
<br />
return valid;<br />
}<br />
</script>Mohiddinhttp://www.blogger.com/profile/03610678833214736380noreply@blogger.com0tag:blogger.com,1999:blog-1414356926793170092.post-19849028287854628552009-12-19T09:11:00.000-08:002010-10-19T05:03:40.107-07:00Validations in Php Validations in Php plays an important role just like validations in Asp and other different platforms. <br />
<br />
Validations in Php can be applied in two manners first one is writing the validation function for particular textbox or checkbox or whatever it may the content under the form i.e. is <br />
<a name='more'></a><form>..</form> in that page only between the scripting tags <script>..</script> that again between the head tags <head>..</head>.<br />
<br />
Another way in Validations in Php writing the entire script in one page and saving with <span class="ver" title="If this is a new sentence, it should start with a capital letter.">.js</span> file and that <span class="ver" title="If this is a new sentence, it should start with a capital letter.">.js</span> file included in particular page where validations is needed<span class="verupdated" hptip="If the last word is a verb, it needs to be in the singular, e.g.: <i>He want<b>s</b></i>." title="">. The include file</span> is written as <script class="spellmod" hptip="Spelling error - suggestions: java script, java-script, conscript, manuscript, script, subscript, prescript, typescript" language="<span title=">
javascript</span>" src="Validations.<span class="spellmod" title="Spelling error - suggestions: J's, KS, Ks, ks, SJ, JCS, HS, JD, J, S, j, s, Cs, cs, gs, Jo, SS, As, BS, Es, JP, JV, Jr, MS, Ms, NS, OS, Os, PS, US, XS, Zs, as, es, is, jg, ls, ms, rs, ts, us, vs, K's, H's, Jo's, Jr's, PJ's, jg's, pj's, C's, G's, Q's, S's, W's, Y's, A's, B's, D's, E's, F's, L's, M's, N's, P's, R's, T's, V's, X's">js</span>">
</script>. <br />
<br />
In some cases we use two methods mentioned above. Besides to <span class="verupdated" hptip="If the following word is a plural noun, use the form <i>these</i>, e.g. <i><b>these</b> books</i>." title="">these Validations</span> in Php decreases the maximum number of errors, decreases burden to the server and saves us from hanging of the pages. Below I am displaying the Validations code, save them in <span class="ver" hptip="If this is a new sentence, it should start with a capital letter." title="">.js</span> file and include that <span class="ver" title="If this is a new sentence, it should start with a capital letter.">.js</span> file where you need as I mention in the above paragraph how to include that. <br />
<br />
<div id="center_col"><br />
<div style="height: 600px; overflow: auto; padding: 5px; width: 480px;"><br />
<div id="contentscroll2">function Validator(formname)<br />
{<br />
this.formobj=document.forms[formname];<br />
if(!this.formobj)<br />
{<br />
alert("Error: couldnot get Form object "+formname);<br />
return;<br />
}<br />
if(this.formobj.onsubmit)<br />
{<br />
this.formobj.old_onsubmit = this.formobj.onsubmit;<br />
this.formobj.onsubmit=null;<br />
}<br />
else<br />
{<br />
this.formobj.old_onsubmit = null;<br />
}<br />
this.formobj._sfm_form_name=formname;<br />
this.formobj.onsubmit=form_submit_handler;<br />
this.addValidation = add_validation;<br />
this.setAddnlValidationFunction=set_addnl_vfunction;<br />
this.clearAllValidations = clear_all_validations;<br />
this.disable_validations = false;//new<br />
document.error_disp_handler = new sfm_ErrorDisplayHandler();<br />
this.EnableOnPageErrorDisplay=validator_enable_OPED;<br />
this.EnableOnPageErrorDisplaySingleBox=validator_enable_OPED_SB;<br />
this.show_errors_together=true;<br />
this.EnableMsgsTogether=sfm_enable_show_msgs_together;<br />
}<br />
function set_addnl_vfunction(functionname)<br />
{<br />
this.formobj.addnlvalidation = functionname;<br />
}<br />
function sfm_enable_show_msgs_together()<br />
{<br />
this.show_errors_together=true;<br />
this.formobj.show_errors_together=true;<br />
}<br />
function clear_all_validations()<br />
{<br />
for(var itr=0;itr < this.formobj.elements.length;itr++)<br />
{<br />
this.formobj.elements[itr].validationset = null;<br />
}<br />
}<br />
function form_submit_handler()<br />
{<br />
var bRet = true;<br />
document.error_disp_handler.clear_msgs();<br />
for(var itr=0;itr < this.elements.length;itr++)<br />
{<br />
if(this.elements[itr].validationset &&<br />
!this.elements[itr].validationset.validate())<br />
{<br />
bRet = false;<br />
}<br />
if(!bRet && !this.show_errors_together)<br />
{<br />
break;<br />
}<br />
}<br />
if(!bRet)<br />
{<br />
document.error_disp_handler.FinalShowMsg();<br />
return false;<br />
}<br />
<br />
if(this.addnlvalidation)<br />
{<br />
str =" var ret = "+this.addnlvalidation+"()";<br />
eval(str);<br />
if(!ret) return ret;<br />
}<br />
return true;<br />
}<br />
function add_validation(itemname,descriptor,errstr)<br />
{<br />
var condition = null;<br />
if(arguments.length > 3)<br />
{<br />
condition = arguments[3];<br />
}<br />
if(!this.formobj)<br />
{<br />
alert("Error: The form object is not set properly");<br />
return;<br />
}//if<br />
var itemobj = this.formobj[itemname];<br />
if(itemobj.length && isNaN(itemobj.selectedIndex) )<br />
//for radio button; don't do for 'select' item<br />
{<br />
itemobj = itemobj[0];<br />
} <br />
if(!itemobj)<br />
{<br />
alert("Error: Couldnot get the input object named: "+itemname);<br />
return;<br />
}<br />
if(!itemobj.validationset)<br />
{<br />
itemobj.validationset = new ValidationSet(itemobj,this.show_errors_together);<br />
}<br />
itemobj.validationset.add(descriptor,errstr,condition);<br />
itemobj.validatorobj=this;<br />
}<br />
function validator_enable_OPED()<br />
{<br />
document.error_disp_handler.EnableOnPageDisplay(false);<br />
}<br />
<br />
function validator_enable_OPED_SB()<br />
{<br />
document.error_disp_handler.EnableOnPageDisplay(true);<br />
}<br />
function sfm_ErrorDisplayHandler()<br />
{<br />
this.msgdisplay = new AlertMsgDisplayer();<br />
this.EnableOnPageDisplay= edh_EnableOnPageDisplay;<br />
this.ShowMsg=edh_ShowMsg;<br />
this.FinalShowMsg=edh_FinalShowMsg;<br />
this.all_msgs=new Array();<br />
this.clear_msgs=edh_clear_msgs;<br />
}<br />
function edh_clear_msgs()<br />
{<br />
this.msgdisplay.clearmsg(this.all_msgs);<br />
this.all_msgs = new Array();<br />
}<br />
function edh_FinalShowMsg()<br />
{<br />
this.msgdisplay.showmsg(this.all_msgs);<br />
}<br />
function edh_EnableOnPageDisplay(single_box)<br />
{<br />
if(true == single_box)<br />
{<br />
this.msgdisplay = new SingleBoxErrorDisplay();<br />
}<br />
else<br />
{<br />
this.msgdisplay = new DivMsgDisplayer(); <br />
}<br />
}<br />
function edh_ShowMsg(msg,input_element)<br />
{<br />
<br />
var objmsg = new Array();<br />
objmsg["input_element"] = input_element;<br />
objmsg["msg"] = msg;<br />
this.all_msgs.push(objmsg);<br />
}<br />
function AlertMsgDisplayer()<br />
{<br />
this.showmsg = alert_showmsg;<br />
this.clearmsg=alert_clearmsg;<br />
}<br />
function alert_clearmsg(msgs)<br />
{<br />
<br />
}<br />
function alert_showmsg(msgs)<br />
{<br />
var whole_msg="";<br />
var first_elmnt=null;<br />
for(var m in msgs)<br />
{<br />
if(null == first_elmnt)<br />
{<br />
first_elmnt = msgs[m]["input_element"];<br />
}<br />
whole_msg += msgs[m]["msg"] + "\n";<br />
}<br />
<br />
alert(whole_msg);<br />
<br />
if(null != first_elmnt)<br />
{<br />
first_elmnt.focus();<br />
}<br />
}<br />
function sfm_show_error_msg(msg,input_elmt)<br />
{<br />
document.error_disp_handler.ShowMsg(msg,input_elmt);<br />
}<br />
function SingleBoxErrorDisplay()<br />
{<br />
this.showmsg=sb_div_showmsg;<br />
this.clearmsg=sb_div_clearmsg;<br />
}<br />
<br />
function sb_div_clearmsg(msgs)<br />
{<br />
var divname = form_error_div_name(msgs);<br />
show_div_msg(divname,"");<br />
}<br />
<br />
function sb_div_showmsg(msgs)<br />
{<br />
var whole_msg="<ul>\n";<br />
for(var m in msgs)<br />
{<br />
whole_msg += "<li>" + msgs[m]["msg"] + "</li>\n";<br />
}<br />
whole_msg += "</ul>";<br />
var divname = form_error_div_name(msgs);<br />
show_div_msg(divname,whole_msg);<br />
}<br />
function form_error_div_name(msgs)<br />
{<br />
var input_element= null;<br />
<br />
for(var m in msgs)<br />
{<br />
input_element = msgs[m]["input_element"];<br />
if(input_element){break;}<br />
}<br />
<br />
var divname ="";<br />
if(input_element)<br />
{<br />
divname = input_element.form._sfm_form_name + "_errorloc";<br />
}<br />
<br />
return divname;<br />
}<br />
function DivMsgDisplayer()<br />
{<br />
this.showmsg=div_showmsg;<br />
this.clearmsg=div_clearmsg;<br />
}<br />
function div_clearmsg(msgs)<br />
{<br />
for(var m in msgs)<br />
{<br />
var divname = element_div_name(msgs[m]["input_element"]);<br />
show_div_msg(divname,"");<br />
}<br />
}<br />
function element_div_name(input_element)<br />
{<br />
var divname = input_element.form._sfm_form_name + "_" +<br />
input_element.name + "_errorloc";<br />
<br />
divname = divname.replace(/[\[\]]/gi,"");<br />
<br />
return divname;<br />
}<br />
function div_showmsg(msgs)<br />
{<br />
var whole_msg;<br />
var first_elmnt=null;<br />
for(var m in msgs)<br />
{<br />
if(null == first_elmnt)<br />
{<br />
first_elmnt = msgs[m]["input_element"];<br />
}<br />
var divname = element_div_name(msgs[m]["input_element"]);<br />
show_div_msg(divname,msgs[m]["msg"]);<br />
}<br />
if(null != first_elmnt)<br />
{<br />
first_elmnt.focus();<br />
}<br />
}<br />
function show_div_msg(divname,msgstring)<br />
{<br />
if(divname.length<=0) return false;<br />
<br />
if(document.layers)<br />
{<br />
divlayer = document.layers[divname];<br />
if(!divlayer){return;}<br />
divlayer.document.open();<br />
divlayer.document.write(msgstring);<br />
divlayer.document.close();<br />
}<br />
else<br />
if(document.all)<br />
{<br />
divlayer = document.all[divname];<br />
if(!divlayer){return;}<br />
divlayer.innerHTML=msgstring;<br />
}<br />
else<br />
if(document.getElementById)<br />
{<br />
divlayer = document.getElementById(divname);<br />
if(!divlayer){return;}<br />
divlayer.innerHTML =msgstring;<br />
}<br />
divlayer.style.visibility="visible"; <br />
return false;<br />
}<br />
function ValidationDesc(inputitem,desc,error,condition)<br />
{<br />
this.desc=desc;<br />
this.error=error;<br />
this.itemobj = inputitem;<br />
this.condition = condition;<br />
this.validate=vdesc_validate;<br />
}<br />
function vdesc_validate()<br />
{<br />
if(this.condition != null )<br />
{<br />
if(!eval(this.condition))<br />
{<br />
return true;<br />
}<br />
}<br />
if(!validateInput(this.desc,this.itemobj,this.error))<br />
{<br />
this.itemobj.validatorobj.disable_validations=true;<br />
this.itemobj.focus();<br />
return false;<br />
}<br />
return true;<br />
}<br />
function ValidationSet(inputitem,msgs_together)<br />
{<br />
this.vSet=new Array();<br />
this.add= add_validationdesc;<br />
this.validate= vset_validate;<br />
this.itemobj = inputitem;<br />
this.msgs_together = msgs_together;<br />
}<br />
function add_validationdesc(desc,error,condition)<br />
{<br />
this.vSet[this.vSet.length]=<br />
new ValidationDesc(this.itemobj,desc,error,condition);<br />
}<br />
function vset_validate()<br />
{<br />
var bRet = true;<br />
for(var itr=0;itr<this.vSet.length;itr++)<br />
{<br />
bRet = bRet && this.vSet[itr].validate();<br />
if(!bRet && !this.msgs_together)<br />
{<br />
break;<br />
}<br />
}<br />
return bRet;<br />
}<br />
function validateEmail(email)<br />
{<br />
var splitted = email.match("^(.+)@(.+)$");<br />
if(splitted == null) return false;<br />
if(splitted[1] != null )<br />
{<br />
var regexp_user=/^\"?[\w-_\.]*\"?$/;<br />
if(splitted[1].match(regexp_user) == null) return false;<br />
}<br />
if(splitted[2] != null)<br />
{<br />
var regexp_domain=/^[\w-\.]*\.[A-Za-z]{2,4}$/;<br />
if(splitted[2].match(regexp_domain) == null)<br />
{<br />
var regexp_ip =/^\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]$/;<br />
if(splitted[2].match(regexp_ip) == null) return false;<br />
}// if<br />
return true;<br />
}<br />
return false;<br />
}<br />
<br />
function IsCheckSelected(objValue,chkValue)<br />
{<br />
var selected=false;<br />
var objcheck = objValue.form.elements[objValue.name];<br />
if(objcheck.length)<br />
{<br />
var idxchk=-1;<br />
for(var c=0;c < objcheck.length;c++)<br />
{<br />
if(objcheck[c].value == chkValue)<br />
{<br />
idxchk=c;<br />
break;<br />
}//if<br />
}//for<br />
if(idxchk>= 0)<br />
{<br />
if(objcheck[idxchk].checked=="1")<br />
{<br />
selected=true;<br />
}<br />
}//if<br />
}<br />
else<br />
{<br />
if(objValue.checked == "1")<br />
{<br />
selected=true;<br />
}//if<br />
}//else <br />
<br />
return selected;<br />
}<br />
function TestDontSelectChk(objValue,chkValue,strError)<br />
{<br />
var pass = true;<br />
pass = IsCheckSelected(objValue,chkValue)?false:true;<br />
<br />
if(pass==false)<br />
{<br />
if(!strError || strError.length ==0)<br />
{<br />
strError = "Can't Proceed as you selected "+objValue.name; <br />
}//if <br />
sfm_show_error_msg(strError,objValue);<br />
<br />
}<br />
return pass;<br />
}<br />
function TestShouldSelectChk(objValue,chkValue,strError)<br />
{<br />
var pass = true;<br />
<br />
pass = IsCheckSelected(objValue,chkValue)?true:false;<br />
<br />
if(pass==false)<br />
{<br />
if(!strError || strError.length ==0)<br />
{<br />
strError = "You should select"+objValue.name; <br />
}//if <br />
sfm_show_error_msg(strError,objValue);<br />
<br />
}<br />
return pass;<br />
}<br />
function TestRequiredInput(objValue,strError)<br />
{<br />
var ret = true;<br />
var val = objValue.value;<br />
val = val.replace(/^\s+|\s+$/g,"");//trim<br />
if(eval(val.length) == 0)<br />
{<br />
if(!strError || strError.length ==0)<br />
{<br />
strError = objValue.name + " : Required Field";<br />
}//if<br />
sfm_show_error_msg(strError,objValue);<br />
ret=false;<br />
}//if<br />
return ret;<br />
}<br />
function TestMaxLen(objValue,strMaxLen,strError)<br />
{<br />
var ret = true;<br />
if(eval(objValue.value.length) > eval(strMaxLen))<br />
{<br />
if(!strError || strError.length ==0)<br />
{<br />
strError = objValue.name + " : "+ strMaxLen +" characters maximum ";<br />
}//if<br />
sfm_show_error_msg(strError,objValue);<br />
ret = false;<br />
}//if<br />
return ret;<br />
}<br />
function TestMinLen(objValue,strMinLen,strError)<br />
{<br />
var ret = true;<br />
if(eval(objValue.value.length) < eval(strMinLen))<br />
{<br />
if(!strError || strError.length ==0)<br />
{<br />
strError = objValue.name + " : " + strMinLen + " characters minimum ";<br />
}//if <br />
sfm_show_error_msg(strError,objValue);<br />
ret = false; <br />
}//if<br />
return ret;<br />
}<br />
function TestInputType(objValue,strRegExp,strError,strDefaultError)<br />
{<br />
var ret = true;<br />
<br />
var charpos = objValue.value.search(strRegExp);<br />
if(objValue.value.length > 0 && charpos >= 0)<br />
{<br />
if(!strError || strError.length ==0)<br />
{<br />
strError = strDefaultError;<br />
}//if<br />
sfm_show_error_msg(strError,objValue);<br />
ret = false;<br />
}//if<br />
return ret;<br />
}<br />
function TestEmail(objValue,strError)<br />
{<br />
var ret = true;<br />
if(objValue.value.length > 0 && !validateEmail(objValue.value) )<br />
{<br />
if(!strError || strError.length ==0)<br />
{<br />
strError = objValue.name+": Enter a valid Email address ";<br />
}//if <br />
sfm_show_error_msg(strError,objValue);<br />
ret = false;<br />
}//if<br />
return ret;<br />
}<br />
function TestLessThan(objValue,strLessThan,strError)<br />
{<br />
var ret = true;<br />
if(isNaN(objValue.value))<br />
{<br />
sfm_show_error_msg(objValue.name +": Should be a number ",objValue);<br />
ret = false;<br />
}//if<br />
else<br />
if(eval(objValue.value) >= eval(strLessThan))<br />
{<br />
if(!strError || strError.length ==0)<br />
{<br />
strError = objValue.name + " : value should be less than "+ strLessThan;<br />
}//if <br />
sfm_show_error_msg(strError,objValue);<br />
ret = false; <br />
}//if <br />
return ret; <br />
}<br />
function TestGreaterThan(objValue,strGreaterThan,strError)<br />
{<br />
var ret = true;<br />
if(isNaN(objValue.value))<br />
{<br />
sfm_show_error_msg(objValue.name+": Should be a number ",objValue);<br />
ret = false;<br />
}//if<br />
else<br />
if(eval(objValue.value) <= eval(strGreaterThan))<br />
{<br />
if(!strError || strError.length ==0)<br />
{<br />
strError = objValue.name + " : value should be greater than "+ strGreaterThan;<br />
}//if <br />
sfm_show_error_msg(strError,objValue); <br />
ret = false;<br />
}//if <br />
return ret; <br />
}<br />
function TestRegExp(objValue,strRegExp,strError)<br />
{<br />
var ret = true;<br />
if( objValue.value.length > 0 &&<br />
!objValue.value.match(strRegExp) )<br />
{<br />
if(!strError || strError.length ==0)<br />
{<br />
strError = objValue.name+": Invalid characters found ";<br />
}//if <br />
sfm_show_error_msg(strError,objValue);<br />
ret = false; <br />
}//if<br />
return ret;<br />
}<br />
function TestDontSelect(objValue,dont_sel_index,strError)<br />
{<br />
var ret = true;<br />
if(objValue.selectedIndex == null)<br />
{<br />
sfm_show_error_msg("ERROR: dontselect command for non-select Item");<br />
ret = false;<br />
}<br />
if(objValue.selectedIndex == eval(dont_sel_index))<br />
{<br />
if(!strError || strError.length ==0)<br />
{<br />
strError = objValue.name+": Please Select one option ";<br />
}//if <br />
sfm_show_error_msg(strError);<br />
ret = false; <br />
}<br />
return ret;<br />
}<br />
function TestSelectOneRadio(objValue,strError)<br />
{<br />
var objradio = objValue.form.elements[objValue.name];<br />
var one_selected=false;<br />
for(var r=0;r < objradio.length;r++)<br />
{<br />
if(objradio[r].checked == "1")<br />
{<br />
one_selected=true;<br />
break;<br />
}<br />
}<br />
if(false == one_selected)<br />
{<br />
if(!strError || strError.length ==0)<br />
{<br />
strError = "Please select one option from "+objValue.name;<br />
} <br />
sfm_show_error_msg(strError,objValue);<br />
}<br />
return one_selected;<br />
}<br />
<br />
function validateInput(strValidateStr,objValue,strError)<br />
{<br />
var ret = true;<br />
var epos = strValidateStr.search("=");<br />
var command = "";<br />
var cmdvalue = "";<br />
if(epos >= 0)<br />
{<br />
command = strValidateStr.substring(0,epos);<br />
cmdvalue = strValidateStr.substr(epos+1);<br />
}<br />
else<br />
{<br />
command = strValidateStr;<br />
}<br />
switch(command)<br />
{<br />
case "req":<br />
case "required":<br />
{<br />
ret = TestRequiredInput(objValue,strError)<br />
break; <br />
}//case required<br />
case "maxlength":<br />
case "maxlen":<br />
{<br />
ret = TestMaxLen(objValue,cmdvalue,strError)<br />
break;<br />
}//case maxlen<br />
case "minlength":<br />
case "minlen":<br />
{<br />
ret = TestMinLen(objValue,cmdvalue,strError)<br />
break;<br />
}//case minlen<br />
case "alnum":<br />
case "alphanumeric":<br />
{<br />
ret = TestInputType(objValue,"[^A-Za-z0-9]",strError,<br />
objValue.name+": Only alpha-numeric characters allowed ");<br />
break;<br />
}<br />
case "alnum_s":<br />
case "alphanumeric_space":<br />
{<br />
ret = TestInputType(objValue,"[^A-Za-z0-9\\s]",strError,<br />
objValue.name+": Only alpha-numeric characters and space allowed ");<br />
break;<br />
} <br />
case "num":<br />
case "numeric":<br />
{<br />
ret = TestInputType(objValue,"[^0-9]",strError,<br />
objValue.name+": Only digits allowed ");<br />
break; <br />
}<br />
case "dec":<br />
case "decimal":<br />
{<br />
ret = TestInputType(objValue,"[^0-9\.]",strError,<br />
objValue.name+": Only numbers allowed ");<br />
break; <br />
}<br />
case "alphabetic":<br />
case "alpha":<br />
{<br />
ret = TestInputType(objValue,"[^A-Za-z]",strError,<br />
objValue.name+": Only alphabetic characters allowed ");<br />
break;<br />
}<br />
case "alphabetic_space":<br />
case "alpha_s":<br />
{<br />
ret = TestInputType(objValue,"[^A-Za-z\\s]",strError,<br />
objValue.name+": Only alphabetic characters and space allowed ");<br />
break;<br />
}<br />
case "email":<br />
{<br />
ret = TestEmail(objValue,strError);<br />
break;<br />
}<br />
case "lt":<br />
case "lessthan":<br />
{<br />
ret = TestLessThan(objValue,cmdvalue,strError);<br />
break;<br />
}<br />
case "gt":<br />
case "greaterthan":<br />
{<br />
ret = TestGreaterThan(objValue,cmdvalue,strError);<br />
break;<br />
}//case greaterthan<br />
case "regexp":<br />
{<br />
ret = TestRegExp(objValue,cmdvalue,strError);<br />
break;<br />
}<br />
case "dontselect":<br />
{<br />
ret = TestDontSelect(objValue,cmdvalue,strError)<br />
break;<br />
}<br />
case "dontselectchk":<br />
{<br />
ret = TestDontSelectChk(objValue,cmdvalue,strError)<br />
break;<br />
}<br />
case "shouldselchk":<br />
{<br />
ret = TestShouldSelectChk(objValue,cmdvalue,strError)<br />
break;<br />
}<br />
case "selone_radio":<br />
{<br />
ret = TestSelectOneRadio(objValue,strError);<br />
break;<br />
} <br />
}//switch<br />
return ret;<br />
}<br />
function VWZ_IsListItemSelected(listname,value)<br />
{<br />
for(var i=0;i < listname.options.length;i++)<br />
{<br />
if(listname.options[i].selected == true &&<br />
listname.options[i].value == value)<br />
{<br />
return true;<br />
}<br />
}<br />
return false;<br />
}<br />
function VWZ_IsChecked(objcheck,value)<br />
{<br />
if(objcheck.length)<br />
{<br />
for(var c=0;c < objcheck.length;c++)<br />
{<br />
if(objcheck[c].checked == "1" &&<br />
objcheck[c].value == value)<br />
{<br />
return true;<br />
}<br />
}<br />
}<br />
else<br />
{<br />
if(objcheck.checked == "1" )<br />
{<br />
return true;<br />
} <br />
}<br />
return false;<br />
}</div></div></div>Mohiddinhttp://www.blogger.com/profile/03610678833214736380noreply@blogger.com1tag:blogger.com,1999:blog-1414356926793170092.post-6079915901183331012009-12-18T03:23:00.000-08:002010-10-19T05:06:46.783-07:00Introduction to Php In those days the word <span class="spellver" title="Possible spelling error - suggestions: Phip, PP, PH, Pp, HP, Hp, Phi, PhD, Pip, Pap, Pep, Pop, Pup, PH's">Php</span> reaching to the peak levels if compare with other platforms. <span class="spellver" hptip="Possible spelling error - suggestions: Phip, PP, PH, Pp, HP, Hp, Phi, PhD, Pip, Pap, Pep, Pop, Pup, PH's" title="">Php</span> becomes a big competitors for all, even for a Microsoft's Asp and so on.., Hence it is an alternative for all the platforms and its syntax is much similar to '<span class="ver" hptip="You probably need to remove the apostrophe." title="">C'</span> and Perl. <br />
<br />
So, what is <span class="spellver" title="Possible spelling error - suggestions: Phip, PP, PH, Pp, HP, Hp, Phi, PhD, Pip, Pap, Pep, Pop, Pup, PH's">Php</span>? Some people called <span class="spellver" title="Possible spelling error - suggestions: Phip, PP, PH, Pp, HP, Hp, Phi, PhD, Pip, Pap, Pep, Pop, Pup, PH's">Php</span> as Personal Home Page, but technical word for <span class="spellver" title="Possible spelling error - suggestions: Phip, PP, PH, Pp, HP, Hp, Phi, PhD, Pip, Pap, Pep, Pop, Pup, PH's">Php</span> is Hypertext Pre Processor. <span class="spellver" title="Possible spelling error - suggestions: Phip, PP, PH, Pp, HP, Hp, Phi, PhD, Pip, Pap, Pep, Pop, Pup, PH's">Php</span> is a server side scripting language just like Asp. Obviously the scripts are <br />
<a name='more'></a>executed on the server only. Therefore, <span class="spellver" title="Possible spelling error - suggestions: Phip, PP, PH, Pp, HP, Hp, Phi, PhD, Pip, Pap, Pep, Pop, Pup, PH's">Php</span> is a powerful scripting language for creating dynamic and static websites. So you people can <span class="ver" title="You should probably put the word <i>is</i> at the end, e.g.: <i>I will ask how his brother <b>is</b></i>.">ask what is</span> dynamic? And what is static? <span class="spellver" title="Possible spelling error - suggestions: OK, OJ, Oak, Oik, KO, OKs, Pk, K, O, AK, UK, Ox, Wok, OE, OH, OR, Ck, Oh, Oi, Or, Ow, Wk, Bk, Gk, Mk, OB, OD, ON, OS, OT, Ob, Os, Oz, SK, Of, Om, On, Op">Ok</span>, any site is categorized in to two types. One is dynamic which means its database related project/site. This database can be for a login or for a registration or for a download or for an upload whatever it may be it should be related to database only of that site. <br />
<br />
When coming to second one, which is called static which means it is a site without a database. These sites are seemed rarely because in those days everyone is using database for their sites as domains are getting in cheaper rates with min 1GB space. <br />
<br />
One of the important concept in Php is LAMP. In LAMP <br />
L stands for Linux fir windows.<br />
A stands for Apache for web server.<br />
M stands for Mysql database.<br />
P stands for Php for front end.<br />
<br />
The goodness of this software is it's a free software no need to purchase that's why Php related projects are much cheaper than java and <span class="ver" title="You probably need to put a space after the period (and not before).">.Net</span> projects<span class="verupdated" hptip="This expression is usually followed by a comma when it is used at the beginning of a sentence." title="">, Hence</span> Php is <span class="verupdated" hptip="Before vowel sounds, one writes <i>an</i>, e.g., <i><b>an</b> apple</i>, <i><b>an</b> MRI</i>." title="">an open</span> source software. <br />
<br />
As I told in above paragraph that these scripts are executed in server only, for that execution we execute in <span class="spellmod" title="Spelling error - suggestions: local host, local-host, localised, locals, localise, loyalist, vocalist, locales, locale's, goalpost, locality, loyalest, localises, localized, localed, oculist, locust, localize, localizes, calmest, lowliest, locality's">localhost</span> by installing Xampp in our local computer<span class="verupdated" hptip="This expression is usually followed by a comma when it is used at the beginning of a sentence." title="">, hence</span> it acts as intranet to our computer and we also get database with this by going through <span class="spellmod" hptip="Spelling error - suggestions: local host, local-host, localised, locals, localise, loyalist, vocalist, locales, locale's, goalpost, locality, loyalest, localises, localized, localed, oculist, locust, localize, localizes, calmest, lowliest, locality's" title="">localhost</span>/phpmyadmin in the browser. <span class="verupdated" hptip="This expression is usually written as one word, e.g.: <i>wit<b>ho</b>ut</i>, <i>bo<b>yf</b>riend</i>, <i>straigh<b>tf</b>orward</i>, etc." title="">Meanwhile</span> <span class="spellver" hptip="Possible spelling error - suggestions: Phip, PP, PH, Pp, HP, Hp, Phi, PhD, Pip, Pap, Pep, Pop, Pup, PH's" title="">Php</span> supports many databases some of them are Mysql, Oracle, Solid, Postgresql and so on... <br />
<br />
Some people can ask why we use Php rather than Jsp, Asp. As in Jsp we can open only 13 pages and in Asp we can open 43 pages only, but in Php we can open 49 pages. One of the important point is Php can run on different platforms (Linux, UNIX, Windows, etc...), it is compatible with almost all servers used today (Apache, IIS, etc...), Php can download free from the official Php resource: www.php.net and it is easy to learn so that we can run efficiently on the server side. <br />
<br />
<b>Syntax :- </b><br />
<br />
<?Php<br />
<br />
some_ statements<br />
?><br />
<b>Example :- </b><br />
<br />
<?Php<br />
Echo "HELLO";<br />
?><br />
<br />
<b>Output:</b> HELLO.<br />
<br />
These are some of the valuable information and introduction regarding to Php.<br />
Good Luck.Mohiddinhttp://www.blogger.com/profile/03610678833214736380noreply@blogger.com0tag:blogger.com,1999:blog-1414356926793170092.post-78745727958765068112009-12-16T05:16:00.000-08:002010-10-19T05:23:24.501-07:00Example for checkbox with commands INSERT and UPDATE in Php Single page project related to checkbox with commands INSERT and UPDATE. <br />
<br />
Actually this page was taken from my already done a top SCHOOL management project. The basic idea behind this is as follows:-<br />
<br />
1. Storing all the data in a remote server not in local server means maintaining the data in an online database so that admin can use the data from anywhere from his location. <br />
<a name='more'></a><br />
<br />
2. At the time when student come to pay the fee the cashier not to enter the fee amount. The term amount generated automatically when cashier select the class and also at each time cashier select the term's checkbox the respective term amount should be displayed in a <span class="spellmod" hptip="Spelling error - suggestions: text box, text-box, textbooks, textbook, textbook's" title="">text box</span> called Total Amount, Obviously the print also come at the time of submit. <br />
<br />
Note:-<br />
Here what fee amount decided by admin in his panel per class that amount should be generated.<span class="verupdated" hptip="This expression is usually followed by a comma when it is used at the beginning of a sentence." title=""></span><br />
<br />
3. In the same procedure the new student admission also be done.<br />
<br />
4. Database should be maintained for each student’s for his marks, admission details, fee and so on...<br />
<br />
5. The necessary steps related for a perfect SCHOOL management system.<br />
<br />
Meanwhile here I am concentrate on Single page project related for checkbox Using commands INSERT and UPDATE for a student's fee paying page. Actually it contains two pages why because in one page the cashier enters the admission no and select the class and press the submit button, In page2 the respective data automatically generated, Briefly as follows:-<br />
<br />
<b>Step1:-</b><br />
Here cashier simply enters the admission no and select the class and then press submit button. <br />
Note:-<br />
Observe in this page that I am used session so that this page data can easily navigate to another page. <br />
<br />
<div style="height: 300px; overflow: auto; padding: 5px; width: 480px;"><!--step1 --><br />
<? session_start();<br />
$cla=$_POST['class'];//here class stores in variable<br />
$cad=$_POST['addno'];<br />
$username=$_POST['uid'];<br />
if(!isset($_SESSION['uid']))<br />
{<br />
echo "<script> location.replace('../index.php'); </script>";<br />
}<br />
?><br />
<?<br />
if($_POST['submit']=="Enter")<br />
{<br />
<br />
$_SESSION['ha']=$cla;//session contains the value class<br />
<br />
$_SESSION['ad']=$cad;<br />
<br />
<br />
$_SESSION['na']=$fel['name'];<br />
echo "<script> location.replace('student_feepaymentbilling.php'); </script>";<br />
}<br />
?><br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br />
<html xmlns="http://www.w3.org/1999/xhtml"><br />
<head><br />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><br />
<title>cashier</title><br />
<script language="javascript" src="../js/gen_validatorv31.js"></script><br />
<link href="cashierstyle.css" rel="stylesheet" type="text/css"/></head><br />
<br />
<body bgcolor="#333333" leftmargin="0" rightmargin="0"><br />
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"><br />
<tr><br />
<td height="39" valign="top" align="right"><table width="100" border="0" cellpadding="0" cellspacing="0"><br />
<tr><br />
<td width="45"><span class="style3"><a href="billing_joining.php">Home</a></span></td><br />
<td width="45"><a href="../logout.php"><strong>Logout</strong></a></td><br />
</tr><br />
</table></td><br />
</tr><br />
<tr><br />
<td><table width="100%" border="0" bgcolor="#282828" cellpadding="0" cellspacing="0"><br />
<tr><br />
<td valign="top"><? include "navi.php";?></td><br />
</tr><br />
</table></td><br />
</tr><br />
<tr><br />
<td height="313"><br />
<form name="fff" action="" method="post"><table width="286" border="0" align="center"><br />
<tr><br />
<td colspan="3" ><span class="style12">Student Fee: </span></td><br />
</tr><br />
<tr bgcolor="#282828"><br />
<td width="98"><span class="style2 style11">Admission No. </span></td><br />
<br />
<td width="174"><input type="text" name="addno" /></td><br />
</tr><br />
<tr bgcolor="#282828"><br />
<td class="style11">Class</td><br />
<br />
<td><table width="86%" border="0" cellpadding="0" cellspacing="0"><br />
<tr><br />
<td width="59%"><select name="class"><br />
<option></option><br />
<option value="lkg">lkg</option><br />
<option value="ukg">ukg</option><br />
<option value="class1">class1</option><br />
<option value="class2">class2</option><br />
<option value="class3">class3</option><br />
<option value="class4">class4</option><br />
<option value="class5">class5</option><br />
<option value="class6">class6</option><br />
<option value="class7">class7</option><br />
<option value="class8">class8</option><br />
<option value="class9">class9</option><br />
<option value="class10">class10</option><br />
</select></td><br />
<td width="41%"><br />
<div align="right"><br />
<input type="submit" name="submit" value="Enter" /><br />
</div></td><br />
</tr><br />
</table></td><br />
</tr><br />
</table><br />
</form><br />
<script language="JavaScript" type="text/javascript"><br />
var frmvalidator = new Validator("fff");<br />
<br />
frmvalidator.addValidation("addno","req","Please Enter Admission No. Number");<br />
frmvalidator.addValidation("addno","numeric");<br />
frmvalidator.addValidation("class","req","Please Select The Class"); <br />
<br />
</script><br />
<br />
</td><br />
</tr><br />
</table><br />
</body><br />
</html></div><br />
<b>Step2:-</b><br />
Here cashier just simply click the terms (checkboxes), remaining data will be generated automatically w.r<span class="ver" hptip="There should be a space at the beginning of the sentence." title="">.t to</span> Step1, As you see below figure after the code the date is the current date of the day, the receipt no., the name, class of the student, admission no, finally total of checkbox at each time you select the checkbox. <br />
<div style="height: 300px; overflow: auto; padding: 5px; width: 480px;"><!--step2 --><br />
<?php<br />
session_start();<br />
$username=$_POST['uid'];<br />
$hl=$_POST['class'];<br />
$h2=$_POST['addno'];<br />
<br />
$sel=$_SESSION['ha'];<br />
$adm=$_SESSION['ad'];<br />
include "dbconnection.php";<br />
extract($_POST);<br />
$result33=mysql_query("SELECT * <br />
FROM `$sel` <br />
WHERE `addmissionno` = '$adm'<br />
LIMIT 1<br />
"); <br />
$fel33=mysql_fetch_array($result33);<br />
if($fel33=="")<br />
{<br />
echo "<script> location.replace('fee_enterclass.php'); </script>";<br />
<br />
}<br />
<br />
if(!isset($_SESSION['uid']))<br />
{<br />
echo "<script> location.replace('../index.php'); </script>";<br />
} <br />
$result6=mysql_query("SELECT * from feerv where class='$sel'");<br />
$fet6=mysql_fetch_array($result6);<br />
<br />
$result=mysql_query("SELECT receipt_no from feebilling ORDER BY receipt_no DESC LIMIT 1 \n");<br />
$fet=mysql_fetch_array($result); <br />
extract($_POST); <br />
if($_POST['submit']=='pay')<br />
{ <br />
mysql_query("INSERT INTO feebilling VALUES(`receipt_no`,'$date','$addmission_no','$name','$class','$installment_1','$installment_2','$installment_3','$installment_4')");<br />
$result1=mysql_query("SELECT installment_1,installment_2,installment_3,installment_4 from $class where addmissionno='$addmission_no'");<br />
$fet1=mysql_fetch_array($result1);<br />
$t1=$fet1['installment_1'];<br />
$t2=$fet1['installment_2'];<br />
$t3=$fet1['installment_3'];<br />
$t4=$fet1['installment_4'];<br />
<br />
$result2=mysql_query("SELECT installment_1,installment_2,installment_3,installment_4 from feebilling ORDER BY receipt_no DESC LIMIT 1 \n");<br />
$fet2=mysql_fetch_array($result2);<br />
$r1=$fet2['installment_1'];<br />
$r2=$fet2['installment_2'];<br />
$r3=$fet2['installment_3'];<br />
$r4=$fet2['installment_4'];<br />
<br />
if($t1 >= $r1)<br />
{<br />
$f1=$t1;<br />
}<br />
else<br />
{$f1=$r1;}<br />
<br />
if($t2 >= $r2)<br />
{<br />
$f2=$t2;<br />
}<br />
else<br />
{$f2=$r2;}<br />
<br />
if($t3 >= $r3)<br />
{<br />
$f3=$t3;<br />
}<br />
else<br />
{$f3=$r3;}<br />
<br />
if($t4 >= $r4)<br />
{<br />
$f4=$t4;<br />
}<br />
else<br />
{$f4=$r4; } <br />
<br />
mysql_query("UPDATE `school`.`$class` SET `installment_1` = '$f1',<br />
`installment_2` = '$f2',<br />
`installment_3` = '$f3',<br />
`installment_4` = '$f4' WHERE `$class`.`addmissionno` ='$addmission_no'");<br />
<br />
echo "<script> location.replace('fee_receipt.php'); </script>" ;<br />
}<br />
?><br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br />
<html xmlns="http://www.w3.org/1999/xhtml"><br />
<head><br />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><br />
<title>cashier</title><br />
<script><br />
function validate_checkbox ( )<br />
{<br />
valid = true;<br />
<br />
if ( document.f1.installment_1.checked == false && document.f1.installment_2.checked == false && document.f1.installment_3.checked == false && document.f1.installment_4.checked == false )<br />
{<br />
alert ( "Please check one of the term" );<br />
valid = false;<br />
}<br />
<br />
return valid;<br />
}</script><br />
<script language=javascript><br />
var a=10; //set the value of first textbox.<br />
var b=20; //set the value of second textbox.<br />
var c=30; //set the value of third textbox.<br />
function app()<br />
{<br />
if(f1.installment_1.checked==true)<br />
$x=<? echo $fet6['term1']; ?>;<br />
else<br />
$x=0;<br />
if(f1.installment_2.checked==true)<br />
$y=<? echo $fet6['term2']; ?>;<br />
else<br />
$y=0;<br />
if(f1.installment_3.checked==true)<br />
$z=<? echo $fet6['term3']; ?>;<br />
else<br />
$z=0;<br />
if(f1.installment_4.checked==true)<br />
$a=<? echo $fet6['term4']; ?>;<br />
else<br />
$a=0; <br />
if(f1.installment_1.checked || f1.installment_2.checked || f1.installment_3.checked || f1.installment_4.checked==true)<br />
{<br />
<br />
$sum=$x+$y+$z+$a;<br />
f1.amt.value=$sum;<br />
}<br />
else<br />
f1.amt.value=0; <br />
}<br />
</script><br />
<br />
<!--Script by hscripts.com--><br />
</head><br />
<link href="cashierstyle.css" rel="stylesheet" type="text/css"/><br />
<br />
<body bgcolor="#333333"><form name="f1" action="" onSubmit="return validate_checkbox()" method="post"><br />
<table width="966" border="0"><br />
<tr><br />
<td height="51" align="right" valign="top"><br />
<table width="100" border="0" cellpadding="1" cellspacing="4"><br />
<tr><br />
<td width="45"><span class="style1"><strong><a href="billing_joining.php">Home</a></strong></span></td><br />
<td width="45"><a href="../logout.php"><strong>Logout</strong></a></td><br />
</tr><br />
</table></td><br />
</tr><br />
<tr><br />
<td><table width="450" border="0" align="center" cellpadding="2" cellspacing="2"><br />
<tr><br />
<td colspan="4" ><span class="style12">Student Fee Billing:</span></td><br />
</tr><br />
<tr bgcolor="#282828"><br />
<td width="77"><span class="style11">Recipt No.</span></td><br />
<br />
<td width="144"><span class="style11"><? echo $fet['receipt_no']+1; ?></span></td><br />
<td width="91">&nbsp;</td><br />
<td width="74">&nbsp;</td><br />
</tr><br />
<tr bgcolor="#282828"><br />
<td><span class="style11">Date </span></td><br />
<br />
<td><input name="date" type="text" size="8" value="<?php<br />
echo date("Y-m-d");<br />
?>" readonly="readonly"/></td><br />
<td><span class="style11">Admission No.</span></td><br />
<td><input name="addmission_no" type="text" size="10" value="<?php<br />
echo $adm;<br />
?>" readonly="readonly"/></td><br />
</tr><br />
<tr bgcolor="#282828"><br />
<td><span class="style11">Name</span></td><br />
<br />
<td><input type="text" name="name" value="<? echo $fel33['name']; ?>" readonly="readonly"/></td><br />
<td><span class="style11">Class</span></td><br />
<td><input name="class" type="text" size="10" value="<?php<br />
echo $sel;<br />
?>" readonly="readonly"/></td><br />
</tr><br />
<br />
<tr bgcolor="#282828"><br />
<td class="style11">Payment For </td><br />
<br />
<td><label><br />
<input type="checkbox" name="installment_1" value="<? echo $fet6['term1']; ?>" onclick="app()"/><br />
<span class="style11">Term_1</span></label></td><br />
<td>&nbsp;</td><br />
<td>&nbsp;</td><br />
</tr><br />
<tr bgcolor="#282828"><br />
<td>&nbsp;</td><br />
<br />
<td><input name="installment_2" type="checkbox" value="<? echo $fet6['term2']; ?>" onclick="app()"/><br />
<span class="style11">Term_2</span></td><br />
<td>&nbsp;</td><br />
<td>&nbsp;</td><br />
</tr><br />
<tr bgcolor="#282828"><br />
<td>&nbsp;</td><br />
<br />
<td><input type="checkbox" name="installment_3" value="<? echo $fet6['term3']; ?>" onclick="app()"/><br />
<span class="style11">Term_3</span></td><br />
<td>&nbsp;</td><br />
<td>&nbsp;</td><br />
</tr><br />
<tr bgcolor="#282828"><br />
<td>&nbsp;</td><br />
<br />
<td><input type="checkbox" name="installment_4" value="<? echo $fet6['term4']; ?>" onclick="app()"/><br />
<span class="style11">Term_4</span></td><br />
<td><span class="style11">Total Amount</span></td><br />
<td><input name="amt" type="text" size="10" readonly="readonly" /></td><br />
</tr><br />
<tr><br />
<td>&nbsp;</td><br />
<br />
<td>&nbsp;</td><br />
<td>&nbsp;</td><br />
<td align="right"><input type="submit" name="submit" value="pay" /></td><br />
</tr> <br />
</table></td><br />
</tr><br />
</table><br />
</form><br />
</body><br />
</html></div><br />
Output:- For Step1 And Step2<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtlx6FacZm-jhruIZyrwUKf7h6s22mygGOP2oozO6DZXA-LQlKF386Wcno02LvQ_7sPsCRzxaSBuhIpn5_iVOhqYY5NYuwuGnnCGvJOQsxOvMFsibUukELvri4yv7LhqFTDsyYk9GX7x8Z/s1600-h/entering+the+class.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5415837506674483810" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtlx6FacZm-jhruIZyrwUKf7h6s22mygGOP2oozO6DZXA-LQlKF386Wcno02LvQ_7sPsCRzxaSBuhIpn5_iVOhqYY5NYuwuGnnCGvJOQsxOvMFsibUukELvri4yv7LhqFTDsyYk9GX7x8Z/s320/entering+the+class.jpg" style="float: left; height: 230px; margin: 0pt 10px 10px 0pt; width: 320px;" /></a><br />
<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuKIU68C_CHN4MnwjyB7pQrbOedUxtFyA5ihyphenhyphenrWqdHGqdAdBI4NYGv9pVQgpiUFIV5flg5JQiNPuctxSofF2HL8XF7Rgy41ABlgqju73bCRvRoOEyRkQWa4Y4GN5hb9iu9ZfjHBjfFRfig/s1600-h/step2.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5415850391736842274" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuKIU68C_CHN4MnwjyB7pQrbOedUxtFyA5ihyphenhyphenrWqdHGqdAdBI4NYGv9pVQgpiUFIV5flg5JQiNPuctxSofF2HL8XF7Rgy41ABlgqju73bCRvRoOEyRkQWa4Y4GN5hb9iu9ZfjHBjfFRfig/s320/step2.jpg" style="float: left; height: 230px; margin: 0pt 10px 10px 0pt; width: 320px;" /></a>Mohiddinhttp://www.blogger.com/profile/03610678833214736380noreply@blogger.com0tag:blogger.com,1999:blog-1414356926793170092.post-62102244849085769252009-12-15T03:11:00.000-08:002010-10-19T05:25:40.185-07:00INSERT AND UPDATE AT THE SAME TIME IN PhpUPDATE In Mysql w.r.t Php:-<br />
<br />
UPDATE command in Mysql plays an important role. As we know that we use Xampp in our system for various purposes such as for browsing in localhost, for database point of view we go through http://localhost/phpmyadmin for the use of database as generation/creations/modifying /deleting….. of commands.<br />
<a name='more'></a><br />
<br />
Meanwhile why I am concentrate on UPDATE rather than other commands (INSERT, CREATE, DELETE) because today so many people facing problems with UPDATE command. If the UPDATE command relating to one table it's easy, but if UPDATE command related to more than one table is difficult. <br />
<br />
FAQ:-<br />
What is the difficulty during Update command?<br />
Answer:-<br />
The difficulty is when you face UPDATE command with two or more tables,<br />
for example there are 3 values in one table it should be INSERT ed and another table it should be UPDATE ed .<br />
<br />
With INSERT there is no problem the values are INSERT ed , In the same time the values are also UPDATE ed in another table as you see the particular record in a Database but other values(fields) turns to ‘0’. <br />
<br />
Solution:-<br />
<br />
What to Do?<br />
Here I am taken the data related to fee.<br />
In <b>Step1:</b>-The data should be INSERT in fee record.<br />
In <b>Step2:</b>-The same data should be UPDATED in Student record without disturbance of other fields in that record such as name ,class, roll no and so on..<br />
<br />
How To Do?<br />
Here we give importance to merging concept, asmall code w.r.t ‘C’.<br />
Source Code as follows:-<br />
<br />
<div style="height: 500px; overflow: auto; padding: 5px; width: 480px;">$result=mysql_query("SELECT receipt_no from feebilling ORDER BY receipt_no DESC LIMIT 1 \n");<br />
$fet=mysql_fetch_array($result);<br />
<br />
extract($_POST); <br />
if($_POST['submit']=='pay')<br />
{ <br />
mysql_query("INSERT INTO feebilling VALUES(`receipt_no`,'$date','$addmission_no','$name','$class','$installment_1',<br />
'$installment_2','$installment_3','$installment_4')");<br />
$result1=mysql_query("SELECT installment_1,installment_2,installment_3,installment_4 from $class where addmissionno='$addmission_no'");<br />
$fet1=mysql_fetch_array($result1);<br />
$t1=$fet1['installment_1'];<br />
$t2=$fet1['installment_2'];<br />
$t3=$fet1['installment_3'];<br />
$t4=$fet1['installment_4'];<br />
<br />
$result2=mysql_query("SELECT installment_1,<br />
installment_2,installment_3,installment_4 <br />
from feebilling ORDER BY <br />
receipt_no DESC LIMIT 1 \n");<br />
$fet2=mysql_fetch_array($result2);<br />
$r1=$fet2['installment_1'];<br />
$r2=$fet2['installment_2'];<br />
$r3=$fet2['installment_3'];<br />
$r4=$fet2['installment_4'];<br />
<br />
if($t1 >= $r1)<br />
{<br />
$f1=$t1;<br />
}<br />
else<br />
{$f1=$r1;}<br />
<br />
if($t2 >= $r2)<br />
{<br />
$f2=$t2;<br />
}<br />
else<br />
{$f2=$r2;}<br />
<br />
if($t3 >= $r3)<br />
{<br />
$f3=$t3;<br />
}<br />
else<br />
{$f3=$r3;}<br />
<br />
if($t4 >= $r4)<br />
{<br />
$f4=$t4;<br />
}<br />
else<br />
{$f4=$r4; } <br />
<br />
mysql_query("UPDATE `school`.`$class` SET `installment_1` = '$f1',<br />
`installment_2` = '$f2',<br />
`installment_3` = '$f3',<br />
`installment_4` = '$f4' WHERE `$class`.`addmissionno` ='$addmission_no'");</div>Mohiddinhttp://www.blogger.com/profile/03610678833214736380noreply@blogger.com0tag:blogger.com,1999:blog-1414356926793170092.post-12411915631297455552009-12-14T02:31:00.000-08:002010-10-19T05:40:07.015-07:00Sum of the checkbox values at each time select the checkbox. in Php Sum of the checkbox values are basically classified into two types.<br />
<br />
1. As direct sum of the no. of checkboxes.<br />
2. As sum of the checkboxes at each time select the checkbox values.<br />
<br />
Briefly On As sum of the checkboxes at each time select the checkbox values.<br />
<a name='more'></a><br />
<b>Step1:</b><br />
In this, you have to write some <span class="spellmod" hptip="Spelling error - suggestions: java script, java-script, conscript, manuscript, script, subscript, prescript, typescript" title="">javascript</span> first the <span class="spellmod" hptip="Spelling error - suggestions: java script, java-script, conscript, manuscript, script, subscript, prescript, typescript" title="">javascript</span> as follows, which is to paste in your head tag. <br />
<br />
<div style="height: 300px; overflow: auto; padding: 5px; width: 480px;"><br />
<div id="center_col"><div id="contentscroll2"><!--step1 --><br />
<script language="javascript"><br />
function app()<br />
{<br />
if(f1.installment_1.checked==true)<br />
$x=500;<br />
else< $x=0;<br />
if(f1.installment_2.checked==true)<br />
$y=600;<br />
else<br />
$y=0;<br />
if(f1.installment_3.checked==true)<br />
$z=700;<br />
else<br />
$z=0;<br />
if(f1.installment_4.checked==true)<br />
$a=800;<br />
else<br />
$a=0;<br />
if(f1.installment_1.checked f1.installment_2.checked<br />
f1.installment_3.checked f1.installment_4.checked==true)<br />
{<br />
$sum=$x+$y+$z+$a;<br />
f1.amt.value=$sum;<br />
}<br />
else<br />
f1.amt.value=0;<br />
}<br />
</script></div><br />
</div></div><br />
<div id="center_col"><b>Step2:</b><br />
In this, you have to paste below code in html body tag as you see a function is called at each checkbox. <br />
<div id="contentscroll2"><br />
<div style="height: 300px; overflow: auto; padding: 5px; width: 480px;"><br />
<!--step2 --><br />
<td><br />
<label><br />
<input onclick="app()" type="checkbox" value="500" name=" installment_1"><br />
Term_1<br />
</label></td><br />
<td><label><br />
<input onclick="app()" type="checkbox" value="600" name=" installment_1"><br />
Term_1<br />
</label></td><br />
<td><br />
<label><br />
<input onclick="app()" type="checkbox" value="700" name=" installment_1"><br />
Term_1</label></td><br />
<td><br />
<label><br />
<input onclick="app()" type="checkbox" value="800" name=" installment_1"><br />
Term_1<br />
</label></td></div></div></div><br />
<b>Step3:</b><br />
In <span class="verupdated" hptip="You probably need a comma before the last word." title="">this, you</span> display the sum of the checkbox value where you want to display here <span class="verupdated" hptip="Do you mean <i>I am</i>?" title="">i am</span> display the total in a text box. <br />
<br />
<div style="height: 100px; overflow: auto; padding: 5px; width: 480px;"><br />
<!--step3 --><br />
<td>& Amount&</td><br />
<td><input name="amt" type="text" size="10" readonly="readonly"></td></div>Over to you.Mohiddinhttp://www.blogger.com/profile/03610678833214736380noreply@blogger.com0tag:blogger.com,1999:blog-1414356926793170092.post-45490219028007657222009-12-13T02:03:00.000-08:002010-10-19T05:42:09.375-07:00As direct sum of the no. of checkboxes/checkbox values. in Php Sum of the checkbox values are basically classified into two types.<br />
<br />
1. As direct sum of the no. of checkboxes.<br />
2. As sum of the checkboxes at each time select the checkbox values.<br />
<br />
Briefly on,<br />
1.As direct sum of the no. of checkboxes.<br />
<a name='more'></a><br />
<br />
Here you no need to write the javascript or any function, simply assign sum of checkboxes values to a variable finally print that variable using "echo" meanwhile the source code as follows:-<br />
<br />
<br />
$sum=$x+$y+$z; //here assign $x=<input type="checkbox" name="term1" value="500" /> <br />
vice versa.<br />
<br />
echo "$sum";Mohiddinhttp://www.blogger.com/profile/03610678833214736380noreply@blogger.com1tag:blogger.com,1999:blog-1414356926793170092.post-7849221705190774712009-12-12T00:45:00.000-08:002010-10-19T05:43:18.456-07:00Mysql commands in PhpMysql Commands<br />
<br />
Just like a Sql, Mysql commands also same that means there command are also same. No worry about queries all are almost as it is I hope these notes help for beginners and the people who have doubts related to Mysql commands, Hence Mysql are mostly used in Php, And here I Concentrate on Php related coding only. <br />
<br />
Basic commands seen in Mysql are as follows w.r.t to Php Mysql:<br />
<a name='more'></a><br />
<br />
1. CREATE<br />
2. INSERT<br />
3. SELECT<br />
4. UPDATE<br />
5. DELETE<br />
<br />
<b>1. CREATE :-</b><br />
This command is basically used for creation of new table. CREATE example is such a manner, i.e. is as follows. <br />
<br />
<br />
$sql = "CREATE TABLE `school`.`testing` (`rollno` INT(22) NOT NULL, `address` VARCHAR(22) NOT NULL, `name` VARCHAR(22) NOT NULL, `remarks` VARCHAR(22) NOT NULL, PRIMARY KEY (`rollno`)) ENGINE = MyISAM";<br />
<br />
<b>2.</b><b>INSERT :-</b><br />
This command is basically used for INSERT ing values in a table. INSERT example is such a manner, i.e. is as follows. <br />
<br />
<br />
$sql = "INSERT INTO `mysite`.`student` (`student_no`, `name`, `branch`, `probability`, `co`, `ppl`, `ma`, `emmbeded`) VALUES (\'22\', \'HAPPY\', \'M.C.A\', \'66\', \'66\', \'77\', \'67\', \'76\');";<br />
<br />
<b>3. </b><b>SELECT :-</b><br />
This command is basically used for selecting a particular table. SELECT example is such a manner i.e. is as follows.<br />
<br />
<br />
$sql = "SELECT * FROM `class1` LIMIT 0, 30 ";<br />
<br />
<b>4. </b><b>UPDATE :-</b><br />
This command is basically used for UPDATE ing fields in particular table. UPDATE example is such a manner, i.e. is as follows. <br />
<br />
<br />
UPDATE `school`.`class1` SET `English` = '15' WHERE `class1`.`rollno` =1 LIMIT 1 ;<br />
<br />
<b>5. </b><b>DELETE :-</b><br />
This command is basically used for DELETE ing fields in particular table. DELETE example is such a manner, i.e. is as follows. <br />
<br />
<br />
DELETE FROM `school`.`class1` WHERE `class1`.`rollno` =1 LIMIT 1 ;<br />
<br />
Hope it will help for u all…..Mohiddinhttp://www.blogger.com/profile/03610678833214736380noreply@blogger.com0