¿como se pone taget="_blank" en PHP?
Publicado por javi (33 intervenciones) el 25/05/2020 16:32:07
en éste archivo hay una url y quiero que sea en nueva ventana pero está en php y sólo conozco html
¿como se haría?
¿como se haría?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?php
session_start();
$metatitle = "Author Profile - ";
include('../config.php');
include('security.php');
// Initial DB Connect (Can't use header)
$query = 'select * from authors '
."where username ='".$_SESSION['valid_user']."'";
$result = mysql_query($query,$connection) or die(mysql_error());
//Create user data variables
$info = mysql_fetch_array($result);
$id = $info['id'];
$username = $info['username'];
$password = $info['password'];
$url = $info['url'];
$fname = htmlspecialchars($info['fname']);
$email = htmlspecialchars($info['email']);
$displayname = htmlspecialchars($info['displayname']);
$bio = addslashes($info['bio']);
$gravatar = $info['gravatar'];
$mailopt = $info['mailopt']; //0 == checked
// Update the settings
if(isset($_POST['profileupdate'])) {
if(get_magic_quotes_gpc()) {
$updatedisplay = $_POST['displayname'];
$updateurl = $_POST['url'];
$updatebio = $_POST['bio'];
} else {
$updatedisplay = mysql_real_escape_string($_POST['displayname']);
$updateurl = mysql_real_escape_string($_POST['url']);
$updatebio = mysql_real_escape_string($_POST['bio']);
}
$sql = "UPDATE `authors` SET `displayname`='".$updatedisplay."', `url`='".$updateurl."', `bio`='".$updatebio."' WHERE `id`=".$id;
$query = mysql_query($sql);
header('Location: profile.php?profileupdate=true');
exit();
}
include('header.php'); ?>
<!-- LEFT SIDEBAR -->
<?php include('../sidebar.php');
// Call the top area of the author template
$authortop = new Template("../templates/".$template."/author-top.tpl");
// Outputs the page template!
echo $authortop->output();
?>
<h1>Update Your Author Profile</h1>
<br/>
<!-- Confirmations -->
<?php if($_GET["profileupdate"] == "true") {
echo '<div class="alert" style="text-align: center;"><b>Settings updated!</b></div>';
}
?>
<table>
<tr><td valign="top" style=" padding:0 10px 0 0px; border-right: 3px solid #F3F1E9;">
<form method="post" action="profile.php">
<table><tr><td style="width:150px;">Pen Name:</td>
<td><input type="text" name="displayname" value="<?php echo $displayname; ?>" style="width: 250px;"></td></tr>
<tr><td>Homepage:</td>
<td><input type="text" name="url" value="<?php echo $url; ?>" style="width: 250px;"></td></tr>
<tr><td><br/>Bio:</td>
<td><br/><textarea name="bio" style="width: 200px; height: 220px;"><?php echo $bio; ?></textarea></td></tr>
<tr><td colspan="2" align="center">
<br/><input type="submit" value="Update" id="submitstyle"></td></tr>
<input name="profileupdate" type="hidden" id="profileupdate" />
</table></form>
</td>
<td style="padding:0 0 0 20px;" valign="top">
<p><b>Avatar:</b><br/><br/>
<img style="border:2px solid #999; margin: 6px 6px 8px 0; float: left;" src="<?php echo $gravatar; ?>" /><div style="clear:both"></div>This site uses Gravatars - global avatars tied to your email address. To learn more about Gravatars, or to update your image, visit <a href="http://gravatar.com">Gravatar.com</a> and register with the email address you use to access this site. Your image will be updated across this site.</p>
</td></tr></table>
<br/>
<div style="clear:both; width: 100%; padding-top: 15px; border-bottom: 3px solid #F3F1E9;"></div>
<?php
// Call the bottom area of the author template
$authorbottom = new Template("../templates/".$template."/author-bottom.tpl");
// Outputs the page template!
echo $authorbottom->output();
include('../obinclude.php'); ?>
Valora esta pregunta


0