Friday, March 14, 2014
2013 December 31st PHP Class
"First of all thank you very much sir as I got many things about php stuff on that day.I can't explain actually many of my unclear points become cleared.Now I can manage js and php much better than before.Better if you can arrange classes like that in future sir because it really helpful for me."
[TD Samarasinghe]
"Sir I am really happy about the class u have done on 31 st. Since it was a full day class could grab lots of things. If u have more time. we all are looking for another php session.
Happy New Year sir!!"
[Jeewanthi Marasinghe]
Wednesday, March 12, 2014
අන්තර්ජාල වේගය වැඩි කිරීම
One of my Student on Saturday Feb 8, 2014 at Night
________________________________________
Jeewanthi Marasinghe <j-------------@gmail.com> Sat, Feb 8, 2014 at 9:33 AM
To: Rukshan Edirisinghe <rukshan.edirisinghe@gmail.com>
sir here i cn't get the desired output. when i enter username, password and type only i need to redirect the page to profile.php. Can u help me to correct this code.
login.zip
3K
________________________________________
Rukshan Edirisinghe <rukshan.edirisinghe@gmail.com> Sat, Feb 8, 2014 at 9:45 AM
To: Jeewanthi Marasinghe <j-------------@gmail.com>
OK I will chk. Pls send me the Database also.
Thanks and Regards.
Rukshan Edirisinghe <rukshan.edirisinghe@gmail.com> Sat, Feb 8, 2014 at 9:54 AM
To: Jeewanthi Marasinghe <j-------------@gmail.com>
Found the sql.
No need to resend.
Thanks and Regards.
Rukshan Edirisinghe
Jeewanthi Marasinghe <j-------------@gmail.com> Sat, Feb 8, 2014 at 10:03 AM
To: Rukshan Edirisinghe <rukshan.edirisinghe@gmail.com>
yes sir i snt u everything
________________________________________
Rukshan Edirisinghe <rukshan.edirisinghe@gmail.com> Sat, Feb 8, 2014 at 10:25 AM
To: Jeewanthi Marasinghe <j-------------@gmail.com>
Found one error in index file.
Two forms.
Both has action and methods.
But last one has submit button. so that form will submit. But that form will not have user name ,pass .. etc.
Thanks and Regards.
________________________________________
Rukshan Edirisinghe <rukshan.edirisinghe@gmail.com> Sat, Feb 8, 2014 at 10:33 AM
To: Jeewanthi Marasinghe <j-------------@gmail.com>
<body>
<form id="myform" action="login.php" method="POST">
Username: <input name="username" type="text" id="username" value="Jeewa"></br>
Password: <input name="password" type="password" id="password" value="jeewa123"></br>
Login Type:
<select name="type">
<option value="admin">admin</option>
<option value="Staff">Staff</option>
<option value="Student">Student</option>
<option value="Parent">Parent</option>
</select>
<div id="ack"></div>
<button id="submit">Login</button>
</form>
Thanks and Regards.
________________________________________
Rukshan Edirisinghe <rukshan.edirisinghe@gmail.com> Sat, Feb 8, 2014 at 10:37 AM
To: Jeewanthi Marasinghe <j-------------@gmail.com>
Again the logic should changed as follows.
check if already a logged user
otherwise
check the post values first with db
and then set sessions
then redirect to required page.
E.g.:
else{
$sql = "SELECT * FROM users WHERE (username= '$username' AND password = '$password' AND type = '$type')";
$log = mysql_query($sql);
$rows = mysql_num_rows($log);
echo $sql;
if($rows>0){
$_SESSION['user'] = $username;
$_SESSION['type'] = $password;
header("Location: profile.php");
/* Make sure that code below does not get executed when we redirect. */
exit;
}
else
echo "You have no access";
Thanks and Regards.
________________________________________
Jeewanthi Marasinghe <j-------------@gmail.com> Sun, Feb 9, 2014 at 7:39 AM
To: Rukshan Edirisinghe <rukshan.edirisinghe@gmail.com>
sir still it's not working da thing is jeewa can't b da default value for username. It shud vary according to da way of inserting values. I modified da code. didn't gt any meaningful output. It shows Username, Password and Type Are Mandotory
________________________________________
Jeewanthi Marasinghe <j-------------@gmail.com> Sun, Feb 9, 2014 at 7:45 AM
To: Rukshan Edirisinghe <rukshan.edirisinghe@gmail.com>
No sir it's working. Thank u sir :))
________________________________________
Rukshan Edirisinghe <rukshan.edirisinghe@gmail.com> Sun, Feb 9, 2014 at 10:09 PM
To: Jeewanthi Marasinghe <j-------------@gmail.com>
OK. don't put more time on php. focus on semester 5.
After that we may have a time to deal with this.
Thanks and Regards.
Rukshan Edirisinghe
Senior Trainer,
Intel® Teach Program,
P.O.Box. 35, Kandana, Sri Lanka.
Phone & Fax : 11-2242504 Mobile : 77-7597015
www.intel.com/education/lk |www.iteach.schoolnet.lk | www.dnrlk.com
Wednesday, January 16, 2013
Tuesday, December 18, 2012
අන්තර්ජාලයේ ඡායාරූපකරණ පන්තිය
ANY-WAY
People are often unreasonable,
illogical and self-centered,
Forgive them anyway.
If you are kind,
People may acuse you
of selfish, ulterior motives,
Be kind anyway.
If you are successful,
you will win some false friends and
some true enemies;
Succeed anyway, people may cheat you
Be honest and frank anyway.
What you spend years building,
someone could destroy overnight.
Build anyway
If you find serenity and happiness,
they may be jealous;
Be happy anyway.
The good you do today,
people will often forget tomorrow;
Do good anyway.
Give the world the best you have,
and it may never be enough;
Give the world the best you've got anyway.
You see, in the final analysis.
it is between you and God;
It is never between you and them anyway.
http://shirley7150.tripod.com/
Thilina Rukshan Edirisinghe
Wednesday, November 28, 2012
Fwd: Desktop INI Trick
Step by Step process:
1. Open any of your disk drives and right click with your mouse to create a new text document.
2. Type the below code in the text document created.(Better copy and paste)
[ExtShellFolderViews]
{BE098140-A513-11D0-A3A4-00C04FD706EC}={BE098410-A513-11D0-A3A4-00C04FD706EC}
[{BE098140-A513-11D0-A3A4-00C04FD706EC}]
IconArea_Image-=
IconArea_Image=path of jpg,jpeg,bmp,gif file
replace "path of jpg,jpeg,bmp,gif file" in the code with the path of the file where your image is located.
For example, if your jpg image is located in g:\wallpapers with the name Vista, set the path as g:\wallpapers\Vista.jpg
IconArea_Image="G:\wallpapers\Vista.jpg"
3. Now save it with the File name desktop.ini and hit Refresh
Note: Make sure to change the Save as type field from Text Document(*.txt) to All Files.
That's it! Now your favorite image is set as the background.
Success is going from failure to failure without losing your enthusiasm