• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

text from INPUT

Mauzim

Member
Joined
Jan 3, 2011
Messages
568
Reaction score
9
Code:
<?PHP
$name = stripslashes(ucwords(strtolower(trim($_REQUEST['name']))));
if(empty($name)) {
	$main_content .= 'Here you can get detailed information about a certain player on '.$config['server']['serverName'].'.<BR>  <FORM ACTION="/community/characters/player/" METHOD=get><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><div class="BigButton" style="background-image:url(/'.$layout_name.'/images/buttons/sbutton.png)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url(/'.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="/'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></div></TD></TR></TABLE></TD></TR></TABLE></FORM>';
}

how to make that to show
<FORM ACTION="/community/characters/player/ < text what is in INPUT

- - - Updated - - -

any1 know a solution?

- - - Updated - - -

any1 know a solution?
 
bvOiz.png


PHP:
<?PHP
$name = stripslashes(ucwords(strtolower(trim($_REQUEST['name']))));
if(empty($name)) {
    $main_content .= 'Here you can get detailed information about a certain player on '.$config['server']['serverName'].'.<BR>  <TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><div class="BigButton" style="background-image:url(/'.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url(/'.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><a href="/community/characters/player/"><input class="ButtonText" type="image" name="Submit" alt="Submit" onclick=location.href="/community/characters/player/" src="/'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></a></div></div></div></TD></TR></TABLE></TD></TR></TABLE>';
}
?>

Was it correct?
 
no its must be when i click "Submit" i have to see in link /community/characters/player/(nick from INPUT that what i write there)

cuz in mine script i see community/characters/player/?name=namecharacter&Submit.x=14&Submit.y=6
 
At first I thought that you wanted it too display where the button was leading at. :p

Replace METHOD=get with METHOD=post.
 
i know that must be changed but thats is not full of mine request. man i try that and thats change only that i see community/characters/player/ i need see /characters/player/(nickname what we write in INPUT) i try FORM ACTION="/community/characters/player/'.$name.'" METHOD=post but that nothing change too ;s i need that text what we write in INPUT after player/

- - - Updated - - -

Any1 can help me?

- - - Updated - - -

Any1 can help me for this problem?

- - - Updated - - -

Any1 can help me for this problem? Becouse i need it As soon as possible.
 
PHP:
<?php
echo form_open("character/view");
?>
<div class='message'>
<div class='title'>Character lookup</div>
<div class='content'>
<label>Character name</label> <input name='name' id='search' type='text'> 
<input type='submit' value='Search'>
</form>
</div>
</div>
<br/>
<?php 
	if(!empty($_SESSION['sCharacters'])) {
		echo "<div class='message'><div class='title'>History</div><div id='history' class='content'>";
			foreach($_SESSION['sCharacters'] as $character) {
				echo "<b><a href=\"".url('character/view/'.$character['name'])."\">".ucwords($character['name'])."</a></b> - ".ago($character['time'])."<br/>";
			}
		?>
			<a href='#' onClick='$("#history").load("<?php echo url('character/clearHistory');?>");'>Clear History</a>
		<?php 
		echo "</div></div>";
	}
?>

Look at this... Its for search characters on Modern... Maybe you understand it, if not, reply and I will help more...
 
Maybe you could see it here? :

HTML:
<form onsubmit="location.href='/community/character/players/' + document.getElementById('myInput').value; return false;">
  <input type="text" id="myInput" />
  <input type="submit" />
</form>
That should Work :S
P.D.: Fail with my last file posted! Sorry :S

P.D.2: It's html + javascript... :P

P.D.3: Any errors, let me know ;)
 
yes but where add it to this input
PHP:
	$main_content .= 'Here you can get detailed information about a certain player on '.$config['server']['serverName'].'.<BR>  <FORM ACTION="/community/characters/player/" METHOD=get><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><div class="BigButton" style="background-image:url(/'.$layout_name.'/images/buttons/sbutton.png)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url(/'.$layout_name.'/images/buttons/sbutton_over.png);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="/'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></div></TD></TR></TABLE></TD></TR></TABLE></FORM>';
 
PHP:
 $main_content .= 'Here you can get detailed information about a certain player on '.$config['server']['serverName'].'.<BR>  <FORM onsubmit="location.href='/community/character/players/' + document.getElementById('myInput').value; return false;"><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" ID="myInput" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><div class="BigButton" style="background-image:url(/'.$layout_name.'/images/buttons/sbutton.png)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url(/'.$layout_name.'/images/buttons/sbutton_over.png);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="/'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></div></TD></TR></TABLE></TD></TR></TABLE></FORM>';

Try that ... Maybe works...
 
Back
Top