|
If I undestand you correctly, you're trying to add an element at a specific point in the DOM?
First, call dovument.createElement to actually create it, specify the attributes you would like, then get a reference to the table's intended parent using document.getElementById, then call parent.appendChild(element)
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Hi all,
A quick thanks to everyone who pointed me to PHP - Its going good !!
However i do have a small problem
The bellow code is never getting into the scond if when i know that $userId and $passord are correct. and also the SQL returns the correct values in the db. I have done a print $rec['userid']; print $rec['password']; but they appear to be blank
any Ideas ???
if($rec=mysql_fetch_array(mysql_query("SELECT * FROM user WHERE UserName='$userid' AND Password = '$password'")))
{
if(($rec['userid']==$userid)&&($rec['password']==$password))
{
Thanks Lots
John
|
|
|
|
|
I will need to see more of the script to help you.
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Can you describe it more???
--------------------------------------------------------------------------------------------------
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 all
Thanks for the response. sorry for the lack of detail in my last post !!
Bellow is the PHP I use to check login.
Any help would be fab
Wrong Login. ";
session_unset();
}
?>
|
|
|
|
|
You wrote:
"if($rec=mysql_fetch_array(mysql_query("SELECT * FROM plus_signup WHERE userid='$userid' AND password = '$password'")))
{
if(($rec['userid']==$userid)&&($rec['password']==$password))"
If you are fetching record with got values of userName and Password then why you again compare them??
--------------------------------------------------------------------------------------------------
Hiral Shah
India
If you think that my answer is good enough and can be helpful for other then don't forget to vote.
|
|
|
|
|
One More thing that I want to know that how you are storing password in the database??
I mean simply store it or by using "password('$password')"??
--------------------------------------------------------------------------------------------------
Hiral Shah
India
If you think that my question is good enough and can be helpful for other then don't forget to vote.
|
|
|
|
|
Hi,
Thanks for the responce !!!
I did the bellow code because i wasnt sure what it would return if nothing was found !!!
if(($rec['userid']==$userid)&&($rec['password']==$password)){
However on testing $rec['userid'] and $rec['password'] do appear to be blank but the below code works correctly. so i am confused as to how it is bringing the result of the SQL back correctly but $rec seems to be empty
if($rec=mysql_fetch_array(mysql_query("SELECT * FROM plus_signup WHERE userid='$userid' AND password = '$password'")))
{
}
else {
Wrong Login. Use your correct Userid and Password and Try ";}
My userid and password are currently just varchars in my database, I mannually entered them.
I am note sure if my explanation is clear. Please tell me if it isnt !
Thanks LOTS !! !!
John
|
|
|
|
|
One big problem you have is that you are not assigning the return values to an array (although I don't know why you are checking them a second time).
$rec = mysql_fetch_array($rec); Put that into your code and it should work, but why are you doing that?
Brad
Australian
- Captain See Sharp on "Religion"
any half intelligent person can come to the conclusion that pink unicorns do not exist.
|
|
|
|
|
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....
|
|
|
|