|
Try this,
$user_name = $_REQUEST['user_id']; // Get the value of user id
$pwd = $_REQUEST['password']; // Get the password
database connection // To connect database if already done than its ok.
$query_check_user = "select * from user where UserName = '$user_name' and Password = '$pwd'";
$result_check_user = mysql_query($query_check_user) or die("Error in Checking validity of the user::Error -> ".mysql_error());
if(mysql_num_rows($result_check_user) == 1)
{
while($row = mysql_fetch_array($result_check_user, MYSQL_ASSOC))
{
$userName = $row['user_name'];
$pass = $row['password'];
}
}
From that you will get the data from database.
--------------------------------------------------------------------------------------------------
Hiral Shah
India
If you think that my answer is good enough and can be helpful for other then don't forget to vote.
|
|
|
|
|
Hi
Thanks Lots for that !!! I will give it a go as soon as i get home
Thanks again
John
|
|
|
|
|
Although your question has been addressed I would like to point out that storing passwords in plain text in a data base is never a good idea.
Passwords should always be encrypted before being stored in a data base. Even the POST method sends the data to the server in plain text so the password should always be encrypted on the client before transmission.
I recommend storing password hash values rather than plain text passwords or even reversible encryptions of the passwords. This limits your liability because you never knew the actual password.
If the person forgets their password you can supply them with a randomly generated password, optionally with a short expiration interval, that is only valid for a single use and must be reset on first access.
You can find javascript versions of MD5 (128 bit) and SHA1 (160 bit) algorithms that can be used to encode passwords on the client prior to transmission on this site.
paj's home[^]
I recommend you do not transmit or store passwords in plain text.
|
|
|
|
|
Hello
my website have two stages, Test and Production and third is my local. What is the best way to keep my files in sync on all the three stages.
let me know...
Thanks
Ajit Singh
|
|
|
|
|
Hi,
What is the best method (if any) to set the picture of an tag using some text string representing an SVG image? That is, I don't want to change the 'src' attribute to point to another file, but to set the actual data somehow... I saw something like which does not seem to work. Maybe I'm supposed to parse/load the file using some Javascript function?
Thanks in advance! /Erik
|
|
|
|
|
Erik Hammar wrote: Maybe I'm supposed to parse/load the file using some Javascript function?
Maybe as a "Developer" you are supposed to find and "Read" Documentation[^]
Having a clear understanding of fundamental concepts is key to being a capable developer.
led mike
|
|
|
|
|
Hi
i'm using asp javascript call back to retrieve
a text from the server and i want to highlight
the keywords in the retrieved text using a
highlight function written in ac# script on the client.
Now i have a problem in calling the highlight function
after getting control back from the server in the client
script, the highlight function is never called after getting back!!
here's the javasript code:
function GetMessageFromServer()
{
CallServer();
}
function ReceiveServerData(rValue)
{
//Label1 is a hidden label inorder to pass the
// string retrieved from the server to the highlight function
document.forms[0]['Label1'].Text=rValue;
if(rValue!="")
{
//calling the highlight function
<% if( ! (Label1.Text.Equals("")))
{
lbl.Text=Highlight(Label1.Text,"test me please!!");
}
%>;
}
}
is there any suggestion to make that c# sript function to be executed only when the javascript function runs???
help is highly appreciated,
Thanks
|
|
|
|
|
ASP.NET executes on the Server, not in the client browser.
led mike
|
|
|
|
|
Hi, Thanks for reply..
ok then, is there a way to call the c# script function "Highlight" from the code behind ?
Thanks..
|
|
|
|
|
r_jaz wrote: is there a way to call the c# script function "Highlight" from the code behind ?
There is no "Highlight" function, you have "inline" server code. It will always be executed anytime the ASP.NET page is executed on the server.
Based on your posts in this thread you might need to drop back to Student mode and study how Web development using Server side code execution works. Having a clear understanding of fundamental concepts is key to being a capable developer.
led mike
|
|
|
|
|
hi there,
i'm desperately looking for an HTML to BBCode (and vice versa) converter, either as a COM component or vbScript for use in an ASP (not .NET) web-application. i sure could write one on my own, but my vbscript/COM skills are a little rusty since I work with C# and .Net for almost the last decade.
does anyone know of something or has a snippet of code in his/her bottom drawer? any hint/help is greatly appreciated.
cheers!
/matthias
I love deadlines. I like the whooshing sound they make as they fly by. [Douglas Adams]
|
|
|
|
|
matthias s. wrote: i'm desperately looking for an HTML to BBCode (and vice versa) converter
JFGI[^]
led mike
|
|
|
|
|
thanks, done this already. I'm not the kind of guy who visits a programming forum before even starting a single, selfmotivated thought.
many of the google-results is php stuff. the rest is online javascript conversion tools, for the end-user who wants to convert some html into bbcode, so that he/she can post it into a forum. what I need is either a COM component (preferably) or some vbScript...
regards!
/matthias
I love deadlines. I like the whooshing sound they make as they fly by. [Douglas Adams]
|
|
|
|
|
The second item returned from that Google search is a Web Page that contains all the Javascript for the HTML to BBCode conversion. It also has table that lists the conversions. I suppose it would be better if someone could just provide you with a ready made solution, but if not you should be able to accomplish your goal using the code and information provided by that page.
led mike
|
|
|
|
|
How to Use HTTP: option while creating the ASP Application. It gives website not ready. I am not Getting after trying all permutation and Combination
Develop2Program & Program2Develop
|
|
|
|
|
Does anyone get that? Looks like another case of babelfish to me....
|
|
|
|
|
I you have no Idea , better not mesh writing space.
Develop2Program & Program2Develop
|
|
|
|
|
What did either of your posts to this thread mean?
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that." - Tommy Boy "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)
|
|
|
|
|
Great, Thanks
As In ASP you create Virtual Directory and provide address for it.
Whereas in ASP.Net you are provided options of HTTP://
So while making does one require to create virtual in IIS or .net Creates for you.
Develop2Program & Program2Develop
Better Foundation Build best Building
|
|
|
|
|
I need to use ActiveX control in HTML. Everything is fine except for a typical requirement that when that HTML page is opened in IE on Windows XP where SP2 is installed to restrict the automatic download of ActiveX control the context menu which says "Install ActiveX Control..." (generally appears on top of the page under Information Bar" the same menu should appear on the right click of the mouse where the control is used on this page.
Thanks in advance.
|
|
|
|
|
You want the menu to appear or it is supposed to appear due to IE rules?
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that." - Tommy Boy "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)
|
|
|
|
|
Thanks for your reply. Just to make my requirement more clear, pls see the screenshot from the given URL.
http://63.134.215.155/OpMem/sshot.jpg
Thanks.
-Gurdev
|
|
|
|
|
Hi there,
Can you tell me that how can I create a dynamic html table from javascript
--------------------------------------------------------------------------------------------------
Hiral Shah
India
If you think that my question is good enough and can be helpful for other then don't forget to vote.
|
|
|
|
|
The idea is to create a XML element with the properties you want using javascript and insert it into the document.
Brad
Australian
- bryce on "Problems with Code Project"
*sigh* Maunder's been coding again...
|
|
|
|
|
hi..
function CreateDynamicTable(noofRows,noofCols)
{
noofRows =5;
noofCols = 5;
var str = "<table width='100%' cellpadding='0' cellspacing='0' border=1 align='left' style='text-indent:5px;'>";
for(var i=0;i<noofRows;i++)
{
str += "<tr width='100%'>";
for(var j=0;j<noofCols;j++)
{
str += "<td>r "+i+"c "+j+"</td>";
}
str += "</tr>";
}
str += "</table>";
// if u dont have any html contol to load the table then create a div
// and attach it to form.
var dv;
dv = document.createElement('div');
dv.setAttribute('id',"LoadDiv");
//dv.style.backgroundColor = 'Red;
dv.innerHTML=str;
document.forms[0].appendChild(dv);
}
|
|
|
|