Jump to content

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]
Link to comment
https://forums.phpfreaks.com/topic/9471-echo-help-cheers/
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
Link to comment
https://forums.phpfreaks.com/topic/9471-echo-help-cheers/#findComment-34929
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.
Link to comment
https://forums.phpfreaks.com/topic/9471-echo-help-cheers/#findComment-34930
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
Link to comment
https://forums.phpfreaks.com/topic/9471-echo-help-cheers/#findComment-34938
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--]
Link to comment
https://forums.phpfreaks.com/topic/9471-echo-help-cheers/#findComment-34946
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.