redarrow Posted May 10, 2006 Share Posted May 10, 2006 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] Quote Link to comment https://forums.phpfreaks.com/topic/9471-echo-help-cheers/ Share on other sites More sharing options...
shocker-z Posted May 10, 2006 Share Posted May 10, 2006 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]RegardsLiam Quote Link to comment https://forums.phpfreaks.com/topic/9471-echo-help-cheers/#findComment-34929 Share on other sites More sharing options...
ober Posted May 10, 2006 Share Posted May 10, 2006 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]<?phpif($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. Quote Link to comment https://forums.phpfreaks.com/topic/9471-echo-help-cheers/#findComment-34930 Share on other sites More sharing options...
redarrow Posted May 10, 2006 Author Share Posted May 10, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/9471-echo-help-cheers/#findComment-34938 Share on other sites More sharing options...
redarrow Posted May 10, 2006 Author Share Posted May 10, 2006 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--] Quote Link to comment https://forums.phpfreaks.com/topic/9471-echo-help-cheers/#findComment-34946 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.