Jump to content

Archived

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

redarrow

echo help cheers.

Recommended Posts

what have i done wrong cheers.

phase errow all the time lol.

[code]

<?

if($not_play_out_date == "no") {

echo"<form method='POST' action='update_promotor_info.php'>";
echo"<select name='dates1'>";
echo"<option value="echo $row['dates1']">echo $row['dates1']</option>";
echo"</select>";
echo"<select nam='dates2'>";
echo"<option value="echo $row['dates2']">echo $row['dates2']</option>";
echo"</select>";
echo"<select name='dates3'>";
echo"<option  value="echo $row['dates3']">echo $row['dates3']</option>";
echo"</select>";
echo"<select name='dates4'>";
echo"<option  value="$row['dates4']">echo $row['dates4']</option>";
echo"</select>";
}
?>
[/code]

Share this post


Link to post
Share on other sites
try
[code]
<?
if($not_play_out_date == "no") {

echo"<form method='POST' action='update_promotor_info.php'>";
echo"<select name='dates1'>";
echo"<option value=\"$row[dates1]\">$row[dates1]</option>";
echo"</select>";
echo"<select nam='dates2'>";
echo"<option value="$row[dates2]\">$row[dates2]</option>";
echo"</select>";
echo"<select name='dates3'>";
echo"<option  value=\"$row[dates3]\">$row[dates3]</option>";
echo"</select>";
echo"<select name='dates4'>";
echo"<option  value=\"$row[dates4]\">$row[dates4]</option>";
echo"</select>";
}
?>
[/code]

Regards
Liam

Share this post


Link to post
Share on other sites
I know you're more experienced than this. You can't echo inside an echo. You have to concatenate variables if you're going to escape the echo. You should avoid using short tags if possible. And you certainly wouldn't have to echo all of that.

[code]<?php

if($not_play_out_date == "no") {
extract($row);
?>
<form method="post" action="update_promotor_info.php">
<select name="dates1">
<option value="<?=$dates1?>"><?=$dates1?></option>
</select>

<select name="dates2">
<option value="<?=$dates2?>"><?=$dates2?></option>
</select>

<select name="dates3">
<option value="<?=$dates3?>"><?=$dates3?></option>
</select>

<select name="dates4">
<option value="<?=$dates4?>"><?=$dates4?></option>
</select>
<?php
}
?>[/code]

You didn't even spell "name" right in one of the select elements. Also, can I ask why you only have 1 option in 4 different select boxes?? If that's going to stay the way it is, you can loop it to create them instead of repeating the same information and only changing a number.

Share this post


Link to post
Share on other sites
sorry for the stupidness


This works but below is wanted dosent work why?
[code]


<form method="POST" action="update_promotor_info.php">

<select name="dates1">

<option value="<?echo $row["dates1"]?>"><?echo $row[dates1]?></option>

</select>

<select name="dates2">

<option value="<?echo $row["dates2"]?>"><?echo $row[dates2]?></option>
</select>

<select name="dates3">

<option  value="<?echo $row["dates3"]?>"><?echo $row[dates3]?></option>

</select>

<select name="dates4">

<option  value="<?$row["dates4"]?>"><?echo $row[dates4]?></option>

</select>
[/code]



The code i want is this

i started with this before getting silly, All i get is a blank table not showing?
[code]
<? if( $not_play_out_date=="no") { ?>

<form method="POST" action="update_promotor_info.php">

<select name="dates1">

<option value="<?echo $row["dates1"]?>"><?echo $row[dates1]?></option>

</select>

<select name="dates2">

<option value="<?echo $row["dates2"]?>"><?echo $row[dates2]?></option>
</select>

<select name="dates3">

<option  value="<?echo $row["dates3"]?>"><?echo $row[dates3]?></option>

</select>

<select name="dates4">

<option  value="<?$row["dates4"]?>"><?echo $row[dates4]?></option>

<?}?>

[/code]


I also tried oders code and i still get blank table dam lol

Share this post


Link to post
Share on other sites
i found the ansaw thank god the code i show and ober shown is correct but i have to use


[code]

if(not_play_out_date = "no") {

}

[/code]


a single = correct the problam thank god.


[!--sizeo:5--][span style=\"font-size:18pt;line-height:100%\"][!--/sizeo--]solved[!--sizec--][/span][!--/sizec--]

Share this post


Link to post
Share on other sites

×

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.