dongxiao0449 2013-08-14 01:49
浏览 17

将一个图像更改为多个图像。

I am using form inputs for change images i already done this. Actually this images show on home page as a new titles.So i have URl input fields for changing images link.I am facing problem when i submit only one link then other one is empty so that's why other image src null.Basically i want to change which image this one old.
Is there any one know how to handle is issue.

Html

<form action="" method="post">

<input type="url" name="image1"/>

<input type="url" name="image2"/>

<input type="url" name="image3" />

<input type="submit"/>

</form>

<img src="<?php echo $img1; ?>" />

<img src="<?php echo $img2; ?>" />

<img src="<?php echo $img3; ?>" />

PHP

<?php

     $img1=$_POST['image1'];

     $img2=$_POST['image2'];

     $img3=$_POST['image3'];

?>
  • 写回答

1条回答 默认 最新

  • dougan1884 2013-09-23 14:13
    关注
    <form action="" method="GET">
    <input type="url" name="image1"/>
    <input type="url" name="image2"/>
    <input type="url" name="image3" />
    <input type="submit"/>
    </form>
    
    
    <?php
    echo '<img src="'.$_GET['image1'].'"/>';
    echo '<img src="'.$_GET['image2'].'"/>';
    echo '<img src="'.$_GET['image3'].'"/>';
    ?>
    
    评论

报告相同问题?

悬赏问题

  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?
  • ¥15 matlab(相关搜索:紧聚焦)
  • ¥15 基于51单片机的厨房煤气泄露检测报警系统设计
  • ¥15 Arduino无法同时连接多个hx711模块,如何解决?
  • ¥50 需求一个up主付费课程
  • ¥20 模型在y分布之外的数据上预测能力不好如何解决