Jump to content

Pass Nickname from the existing browser login


rajarak

Recommended Posts

I configured the CGI IRC successfully and integrated into my website.I would like to pass the login userid of my website as the nickname.It uses the default nickname from the index file i created.I want to use the userid of the user in my website to be the nickname for the IRC.Can someone help me in configuring the same?Thanks a lot!!

Link to comment
Share on other sites

How are you storing the user ID for your site, and how are you connecting to IRC? It would seem straightforward to use whatever you want as the nickname, so if you already have access to the user ID for your site then you should be able to just use that.

Link to comment
Share on other sites

How are you storing the user ID for your site, and how are you connecting to IRC? It would seem straightforward to use whatever you want as the nickname, so if you already have access to the user ID for your site then you should be able to just use that.
I got the user id from the database and stored it onto a variable.I connect to IRC through an URL.The URL hits an HTML file which triggers the CGI file,Is there any way that i can pass the User ID to the HTML form, so i can submit the same to the CGI.Thanks!!!
Link to comment
Share on other sites

It depends on the scope. I was assuming that you are storing the user ID in a variable, but it matter what scope that variable has. If it's, for example, a CGI session variable, then any other CGI program should have access to the same session. It's hard to figure out what's going on though without seeing an example.

Link to comment
Share on other sites

It depends on the scope. I was assuming that you are storing the user ID in a variable, but it matter what scope that variable has. If it's, for example, a CGI session variable, then any other CGI program should have access to the same session. It's hard to figure out what's going on though without seeing an example.
NO, its not stored as CGI session variable.The variable is on the client side, for instance, the user id could be used by any other app inside my web. The click of button in the website will launch the URL for IRC;I just dont get how to get this info(user id) to the CGI file that sits on the server.I know i can send it as query string along with the url, but i want to know if its possible to embedded this one in the html form information that is submitted to the CGI fileThanks again.
Link to comment
Share on other sites

If it's on the client side, then you can use Javascript to add a hidden input element to the form so that it gets submitted.
Can you brief me on that?Here are my sample codeServer side html document:<title>CGI:IRC Login</title></head><body onLoad="setjs();document.loginform.submit()"><form method="get" action="irc.cgi" name="loginform"><form type="hidden" name="interface" value="nonjs"><input type="hidden" name="Nickname" value="Temp"></form></body></html>Client side variableUsernameI want to assign this "Username" to "loginform.nickname.value".Please let me know if you need some more info on that.Thanks!!!
Link to comment
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...