Jump to content

How would i add varibles to a url?


Lee-Bartlett

Recommended Posts

This is my code so far, i was woundering how i could add a varible to this small piece of code, say i named a  varible images, so it went to google.com/images.

 

<?php

echo "<form>";
echo "<td><INPUT type=\"button\" value=\"New Window!\" onClick=\"window.open('http://www.google.com','mywindow','width=600,height=400,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes')\">";
echo "</td></tr>";
echo "</form>";

?>

Link to comment
https://forums.phpfreaks.com/topic/129854-how-would-i-add-varibles-to-a-url/
Share on other sites

YOUR ANSWER IS "QUERY STRING"

 

SYNTAX

URL ? VAR=VALUE &

 

Explanation

after url ? sign indicate that you are going to use variable and values

VAR mean variable

value mean yoru value of the variable

& sign show that you need to declare another variable and value

like this below

http://www.google.com?name=abc&name=abc

 

EXAMPLE

http://www.google.com?name=abc

 

 

and improved form of first reply from other guy

echo 'http://www.google.com".$variable."';

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.