Register for your free account! | Forgot your password?

You last visited: Today at 07:52

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



PHP Value

Discussion on PHP Value within the Web Development forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2012
Posts: 66
Received Thanks: 28
PHP Value

Hallo,

Ich habe eine Textbox und will dort das gepostete ausgeben:

value="<?php echo $user ?>"

Jedoch gibt er mir den kompletten code aus wie muss ich das machen?

Gruß
Bierkiste™ is offline  
Old 03/25/2012, 14:56   #2
 
Shjin's Avatar
 
elite*gold: 0
Join Date: Feb 2010
Posts: 111
Received Thanks: 23
Quote:
value="<?php echo $user ?>"
value="<?php echo $user; ?>"

Vllt liegt das an dem semikolon?
Shjin is offline  
Old 03/25/2012, 14:57   #3
 
elite*gold: 0
Join Date: Mar 2012
Posts: 66
Received Thanks: 28
Nein, er gibt mir den kompletten Code mit <?php ?> innerhalb der Textbox aus.
Bierkiste™ is offline  
Old 03/25/2012, 15:00   #4


 
elite*gold: 0
Join Date: Jul 2009
Posts: 3,357
Received Thanks: 705
Textbox mit PHP ausgeben?

Quote:
<?php
echo '<input type="text" value="' . $user . '">';
?>
StridingGiant is offline  
Old 03/25/2012, 15:03   #5
 
elite*gold: 0
Join Date: Mar 2012
Posts: 66
Received Thanks: 28
Ich Idiot Hier war kein PHP an
Bierkiste™ is offline  
Old 03/25/2012, 15:07   #6


 
elite*gold: 0
Join Date: Jul 2009
Posts: 3,357
Received Thanks: 705
Was machst du denn da?

PHP Code:
<input
type="password"
class="validate[required,length[5,16]]"
id="password"
name="password"
maxlength="16"[COLOR="Red"] >[/COLOR]
<?php
$user 
$_POST["username"];
echo 
'<input type="text" value="' $user '">';
?>
Du hast da grade mehr oder weniger die Textbox in eine Textbox gestopft...
StridingGiant is offline  
Old 03/28/2012, 22:38   #7
 
JPGaming's Avatar
 
elite*gold: 169
Join Date: Jul 2011
Posts: 392
Received Thanks: 261
Statt

PHP Code:
<?php 
$user 
$_POST["username"]; 
echo 
'<input type="text" value="' $user '">'
?>
Ginge es auch ein wenig umständlicher

PHP Code:
<?php 
$user 
$_POST["username"];
?> 
<input type="text" value="'<?=$user;?>'">
JPGaming is offline  
Old 03/31/2012, 13:17   #8


 
elite*gold: 0
Join Date: Jul 2009
Posts: 3,357
Received Thanks: 705
Quote:
Originally Posted by JPGaming View Post
Statt

PHP Code:
<?php 
$user 
$_POST["username"]; 
echo 
'<input type="text" value="' $user '">'
?>
Ginge es auch ein wenig umständlicher

PHP Code:
<?php 
$user 
$_POST["username"];
?> 
<input type="text" value="'<?=$user;?>'">
Kann gar nicht funktionieren. Gehirn einschalten bevor man postet!
StridingGiant is offline  
Old 04/01/2012, 13:31   #9
 
JPGaming's Avatar
 
elite*gold: 169
Join Date: Jul 2011
Posts: 392
Received Thanks: 261
Quote:
Originally Posted by Console' View Post
Kann gar nicht funktionieren. Gehirn einschalten bevor man postet!
Und wenn du es jetzt noch begründen würdest, wüsste man Bescheid, und dein Post wäre weniger unnötig.
JPGaming is offline  
Old 04/02/2012, 10:48   #10
 
PseudoPsycho's Avatar
 
elite*gold: 1715
Join Date: Dec 2011
Posts: 672
Received Thanks: 207
Das einzige, was an dem Code falsch ist, wäre die Ausgabe:
<input type="text" value="'irgendwer'">
Die einachen Anführungszeichen müssen weg!
Naja, und Short-Open-Tags funktionieren auch nicht bei jedem Hoster, da sie aktiviert werden müssen...
Das sind aber nur Kleinigkeiten...
PseudoPsycho is offline  
Reply




All times are GMT +2. The time now is 07:52.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.