Jump to content


Photo

echo help cheers.


  • Please log in to reply
4 replies to this topic

#1 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 10 May 2006 - 03:11 PM

what have i done wrong cheers.

phase errow all the time lol.


<?

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>";
}
?>

Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#2 shocker-z

shocker-z
  • Members
  • PipPipPip
  • Advanced Member
  • 864 posts
  • LocationNottingham

Posted 10 May 2006 - 03:21 PM

try
<?
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>";
}
?>

Regards
Liam
www: www.ukchat.ws | irc: irc.ukchat.ws chan: #blufudge

#3 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 10 May 2006 - 03:22 PM

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.

<?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
}
?>

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.

Info: PHP Manual


#4 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 10 May 2006 - 03:38 PM

sorry for the stupidness


This works but below is wanted dosent work why?


<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>



The code i want is this

i started with this before getting silly, All i get is a blank table not showing?
<? 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>

<?}?>



I also tried oders code and i still get blank table dam lol
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#5 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 10 May 2006 - 03:59 PM

i found the ansaw thank god the code i show and ober shown is correct but i have to use



if(not_play_out_date = "no") {

}



a single = correct the problam thank god.


[!--sizeo:5--][span style=\"font-size:18pt;line-height:100%\"][!--/sizeo--]solved[!--sizec--][/span][!--/sizec--]
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users