Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

enter your name on a website

On my site I wanted to make it so before a user entered the page it there would be a pop up asking for their name, after that somewhere in the page I could type something and it would say in the page what they typed in.
for example
Code
1) Enter your name here: <name>
2) welcome to my site <name>
I've seen this done before But I don't remember the site so I cant get the source. Does anyone know the html code for this?
What are you wanting their name to do?

Just entering it is pointless..

What you want it to do once entered?
Might be for a username script.
Just use PHP sessions to store their name..

Pop up name > store name > stay in session > log out

Isn't hard for a script, good luck!
I would want it to appear in the text somewhere
Just dont do it then ok got it noob?
You could just use a session variable so e.g.

PHP Code

<?php 
$_SESSION
['name'] = your input... 

Then whenever you want to refer to it you just go like so.

PHP Code

<?php 
Welcome
, <b><?php echo $_SESSION['name']; ?></b> 
(Apr 9, 2013 07:30 PM)Duncanrp Wrote:  You could just use a session variable so e.g.

PHP Code

<?php 
$_SESSION
['name'] = your input... 

Then whenever you want to refer to it you just go like so.

PHP Code

<?php 
Welcome
, <b><?php echo $_SESSION['name']; ?></b> 

Don't forgot to type
PHP Code

<?php 
session_start 
in the strictly top of you *.php 🤫
Or you can do it like this:
PHP Code

<?php
$_POST
['name'];
if(isset(
$_POST['submit']))
{
$name=$_POST['name'];
echo(
$name);
}
?>
Donate here:
BTC- 16J13fM3tkugQakx48vNwgn19q1qDxW5Sj
ETH- 0xf36cdEb4A8371401cB4001c7cE2fAd9A6195FCCB
If you want this on a single page use
JScript::

Head Area

Code
<script>
var name=prompt("What Is Your Name?","Your Name");
</script>

Body Area
Code
<script>
document.writeln("Welcome " + name);
</script>

else use PHP + Javascript
save the name in a session using post or get method and use on multiple page.


Possibly Related Threads...
Thread / Author Replies Views Last Post
by tykoApr 26, 2018 01:09 AM 2 118 Apr 26, 2018 01:09 AM
Last Post: .kr.
by ☣☢☣☢☣☢☣☢☣☢☣☢☣☢☣☢☣Jun 30, 2011 02:03 PM 2 44 Jun 30, 2011 02:03 PM
Last Post: iBones