如何在下一页中使用$ _get打开图像 [英] How do I use $_get to open an image in the next page
问题描述
大家好,
我对所有这些编程都很陌生,希望你理解我的问题,因为我不确定自己在寻找什么。
朋友问我以下i.o.学习编程:
创建一个带有按钮的页面使用foreach(鸟图片)并使用$ _get所以当你点击按钮时,会出现鸟的图像在下一页。网址应如下所示?vogel = vogelnr.jpg。
按钮都已创建,但是当我点击它们时,新页面中显示的图像与图片中的相同鸟...我明白了我要求回应那个图像。但我不知道怎么改变这个使用$ _get ???
复制它但它看起来不像我想要的那么好。
Quote:<!DOCTYPE html>
< html>
< head>
< link rel =stylesheettype =text / csshref =style.css>
< / head>
< body>
< title> Hallo Maarten!< / title>
你好,我再来一次,请仔细看看我可爱的小鸟
打我的头,我会唱歌,仔细看看
$ vogels = array('vogel_1.jpg','vogel_2.jpg',vogel_3.jpg,vogel_4.jpg,vogel_5.png,vogel_6.jpg,vogel_7.jpg,vogel_8 .jpg,vogel_9.jpg,vogel_10.jpg);
foreach($ vogels as $ image){
echo'< img src ='。$ image。'/> ';
}
$ aantal_vogels = count($ vogels);
$ random_vogel = $ vogels [array_rand($ vogels,1)];
?>
< / body>
< / html>
_get所以当你点击按钮鸟的图像将出现在下一页。网址应如下所示?vogel = vogelnr.jpg。
按钮都已创建,但是当我点击它们时,新页面中显示的图像与图片中的相同鸟...我明白了我要求回应那个图像。但我不知道怎么改变这个使用
_get ???
复制它但它看起来不看和我想要的一样好。
Quote:<!DOCTYPE html>
< html>
< head>
< link rel =stylesheettype =text / csshref =style.css>
< / head>
< body>
< title> Hallo Maarten!< / title>
你好,我再来一次,请仔细看看我可爱的小鸟
打我的头,我会唱歌,仔细看看
vogels = array('vogel_1.jpg','vogel_2.jpg',vogel_3.jpg,vogel_4.jpg,vogel_5.png,vogel_6.jpg,vogel_7 .jpg,vogel_8.jpg,vogel_9.jpg,vogel_10.jpg);
foreach(
Hello everybody,
I am really new to all this programming, hopefully you understand my questions because I am not sure myself what I am looking for.
A friend asked me the following i.o. to learn programming:
create a page with buttons using foreach (bird pictures) and use $_get so when you click the "button" the image of the bird will appear on the next page. The URL should look like this ?vogel=vogelnr.jpg.
The "buttons" are all created but when I click on them the image that shows in the new page is the same bird of the picture..which I understand since I ask to echo that one image. But I don't know how to change this using $_get???
copied it under but it does not look as good as I want it to.
Quote:<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<title>Hallo Maarten!</title>
Hello it's me again, please take a closer look at my lovely birds
Pad me on the head and I will sing and take a closer look
$vogels = array('vogel_1.jpg','vogel_2.jpg',"vogel_3.jpg","vogel_4.jpg","vogel_5.png","vogel_6.jpg","vogel_7.jpg","vogel_8.jpg","vogel_9.jpg","vogel_10.jpg");
foreach ($vogels as $image) {
echo '<img src="'.$image.'"/> ';
}
$aantal_vogels = count($vogels);
$random_vogel = $vogels[array_rand($vogels,1)];
?>
</body>
</html>解决方案_get so when you click the "button" the image of the bird will appear on the next page. The URL should look like this ?vogel=vogelnr.jpg.
The "buttons" are all created but when I click on them the image that shows in the new page is the same bird of the picture..which I understand since I ask to echo that one image. But I don't know how to change this using
_get???
copied it under but it does not look as good as I want it to.
Quote:<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<title>Hallo Maarten!</title>
Hello it's me again, please take a closer look at my lovely birds
Pad me on the head and I will sing and take a closer look
vogels = array('vogel_1.jpg','vogel_2.jpg',"vogel_3.jpg","vogel_4.jpg","vogel_5.png","vogel_6.jpg","vogel_7.jpg","vogel_8.jpg","vogel_9.jpg","vogel_10.jpg");
foreach (
这篇关于如何在下一页中使用$ _get打开图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!