-1

$sched->start_timeandの値を取得し、$sched->end_timeそれらを に送信したいと考えていnext_page.phpます。

<?php 
 foreach($foo as $row){
 echo "
 <tr>
   <td>".$sched->start_time."</td>
   <td>".$sched->end_time."</td>
   <td class='add'><a class='add_sched' href='next_page.php'>add new</a></td></tr>";
 }
?>

出力は次のようになります


| | 7:30 | 8:30 | *追加 |
| | 8:30 | 9:30 | *追加 |
| | 9:30 | 10:30 | *追加 |

*add @ 8:30-9:30 をクリックすると、その値が送信されnext_page.php ます。

4

1 に答える 1

3

これを試して...

echo
...

 "<td class='add'>
   <a class='add_sched' href='next_page.php?start_time=".$sched->start_time."&end_time=".$sched->end_time."'>add new</a>
</td>"

next.php

$start_time = $_GET['start_time'];
$end_time = $_GET['end_time'];
于 2013-02-05T05:21:59.417 に答える