karthik_ppts commented: Yes +5
Shanti C 106 Posting Virtuoso
karthik_ppts commented: good spot +5
what is the error you are getting here ???
There should be a better way to start a day than waking up every morning..
Hardworking - Success
"One half of the world cannot understand the pleasures of the other."
- Jane Austen
so in this below line you have to pass sender user name not the loggged user name(session).
$query=mysql_query("SELECT *FROM members WHERE username='$username'");
can i ask one question :
you want to display the to_user avatar or from_user avatar here ????
pass the appropriate username in your query while printing avatar.
try to print $email value at line 67...and tell me.
can you please post the required code ???
"Success is not to be pursued; it is to be attracted by the person we become."
- Jim Rohn
Strong reasons make strong actions.
- Shakespeare.
you can validate spaces also like this :
var invalid = " "; // Invalid character is a space
// check for spaces
if (document.myForm.password.value.indexOf(invalid) > -1) {
alert("Sorry, spaces are not allowed.");
return false;
and also check this link :
http://www.dreamincode.net/code/snippet68.htm
Accept that some days you are the pigeon, and some days you are the statue.
"We can learn nothing except by going from the known to the unknown."
- Claude Bernard
evstevemd is right.
and also use comparision operator in if condition instead of assignment operator.
If $_SESSION["Admin"]=='Y'
"A moment's insight is sometimes worth a lifetime's experience."
- Oliver Wendell Holmes Jr.
You can implement this by PHP sessions or cookies.
Learn PHP Sessions here :
http://www.tizag.com/phpT/phpsessions.php
Then you can go for implementations.
refer :
http://marakana.com/blog/examples/php-implementing-secure-login-with-php-javascript-and-sessions-without-ssl.html
If you are using only sessions, you can differ your pages by setting one session like flag 1 for admin and 0 for users.
If you are using databases for this you differ your pages with query.
Try and implement this and post your code for help if you find any difficulties.
Thanks.
you must have to close the printf function in line no 512.
like :
<?php printf( 'your content' );
@karthik , yes.
and also you can write like this simply..
SELECT username, timestamp, topic FROM hotspots GROUP BY topic ORDER BY id DESC
Be true to your work, your word, and your friend.
- Henry David.
It is not enough to help the feeble up, but to support him after.
- Shakespeare
please post your peice of code..
After your update query redirect your page to main page.
So you have to include this line after your query line (line no : 23):
header("Location: main.php");
If this in not your requirement, Please be more specific.
"If you greatly desire something, have the guts to stake everything on obtaining it."
- Brendan Francis
My friend is one... who take me for what I am.
- Henry david.
Keep smiling, because life is a beautiful thing and there's so much to smile about.
- Marilyn Monroe
DaniWeb IT Discussion Community is an on-line IT discussion community.
you have missed semicolon in line 31.
So much stuff is there in google..
Use better keywords.
http://www.google.co.in/search?source=ig&hl=en&rlz=&q=insert+form+data+into+mysql+using+php&aq=0&aqi=g7g-v3&aql=&oq=insert+form+data+
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
- Bill Gates
Learning Jasper Repots...
Using ireport tool new version to create reports/charts.
And also learning how to edit the chart through java code.