If possible, that would be a link. How would I go about doing this? I'm just starting to learn php. Thanks guys.<3
Edited by 12rmcmillin, 06 October 2011 - 04:53 PM.
Edited by 12rmcmillin, 06 October 2011 - 04:53 PM.
|
|
|
<input type="text" id="myId" />
<a href="#" onClick="window.location = 'http://www.test.com/' + document.getElementById('myId').value; return false;">Click Me!</a>
<form action="page2.php" method="post"> <input type="text" name="myName" /> <input type="submit" /> </form>
<?php
if (isset($_POST['myName'])) {
header('Location: http://www.example.com/' . $_POST['myName']);
}
else {
header('Location: page1.php');
}
?>
Vaielab said:
<?php
if (isset($_POST['band'])) {
echo ('http://www.google.com/#sclient=psy-ab&hl=en&safe=active&source=hp&q=' . $_POST['band'] . '+' . $_POST['album'] . '+zip+mediafire');
}
else {
echo ('Error: form empty.');
}
?>
<?php
if (isset($_POST['band'])) {
echo ('<a href="http://www.google.com/#sclient=psy-ab&hl=en&safe=active&source=hp&q=' . $_POST['band'] . '+' . $_POST['album'] . '+zip+mediafire">My link</a>');
}
else {
echo ('Error: form empty.');
}
?>
Vaielab said:
<?php
if (isset($_POST['band'])) {
echo ('<a onclick="_gaq.push(['_trackEvent', 'Outgoing', 'www.google.com', '/']);" rel="nofollow" href="http://www.google.com/#sclient=psy-ab&hl=en&safe=active&source=hp&q=' . $_POST['band'] . '+' . $_POST['album'] . '+zip+mediafire">My link</a>');
}
else {
echo ('Error: form empty.');
}
?>
<head>
<?php
$script = <<<EOD
<script type="text/javascript">
function load() {
_gaq.push(['_trackEvent', 'Outgoing', 'www.google.com', '/']);
window.location = "http://www.google.com/#sclient=psy-ab&hl=en&safe=active&source=hp&q={$_POST['band']}+{$_POST['album']}+zip+mediafire";
}
</script>
EOD
;
echo($script);
?>
<body onLoad="load();">
Vaielab said:
<head>
<?php
$script = <<<EOD
<script type="text/javascript">
function load() {
_gaq.push(['_trackEvent', 'Outgoing', 'www.google.com', '/']);
window.location = "http://www.google.com/#sclient=psy-ab&hl=en&safe=active&source=hp&q={$_POST['band']}+{$_POST['album']}+zip+mediafire";
}
</script>
EOD
;
echo($script);
?>
<body onLoad="load();">
0 members, 1 guests, 0 anonymous users