Jump to content

wordsarefew

New Members
  • Posts

    7
  • Joined

  • Last visited

wordsarefew's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. hey thanks .. i ll look into this.. this is my second week of trying this stuff out.. but question: is this risky even when this is destined to run in a machine through localhost..?
  2. god.. i AM talking nonsense apologies the $flag had no place to be posted.. been looking at this for many hours i could not see past my nose.. thanks for your help it works of course
  3. but what i dont get is this: i used $variables like that in radio buttons higher up and they get defined.. there is a datepicker that logs the date (and gives a day) and 3 radio buttons that divide the day in 3 sections.. e.g. if (monday) and (afternoon) >> a whole lot of html code, including forms etc what you did passes the radio buttons but does not pass the $flag.. have a look at the initial php code for the page.. please for example the $shift belongs to radio buttons prior to the code i enquire about but gets defined.. 3 lines later and the $flag gets flagged up.. i dont know maybe i make no sense.. <?php $name = $notes = $shift = $actName = $flag = ""; $rawDate ="select date"; include 'connection.php'; if(isset($_POST['submit'])){ $rawDate = $_POST['datepicker']; $xplod = explode(' ', $rawDate); $stringDate = "$xplod[3]-$xplod[2]-$xplod[1]"; $phpDate = date("Y-m-d", strtotime($stringDate)); $dayDate = "$xplod[0]"; $shift = $_POST['shift']; $name = $_POST['name']; $notes = $_POST['notes']; $actName = 'activity one'; $flag = $_POST['flag']; mysql_query("INSERT INTO form1notes (`ID`,`date`,`day`,`shift`,`name`,`notes`,`flag`) VALUES (NULL,'$phpDate','$dayDate','$shift','$name','$notes','$flag')"); } ?>
  4. thank you both.. tried jacques version for now. problem is with first suggestion that the $flag variable does not get defined (i think).. the radio buttons go through but i still get the "Undefined index:flag" notice.. referring to a line higher up where: $flag = $_POST['flag']; as for the second suggestion, i ve constructed it this way cause i wanted the html formatting of the table to only appear if that php statement was true.. i am sure there is another more logical way to do it.. i ll keep on trying.. off to try ginerjm now
  5. hi, is this possible? have tried heredocs and various bits from here or there but nothing works. Perhaps i am constructing the whole thing the wrong way up. this is a simplified version of what i am trying to do.. there s more php further up. note that the php in the first row of the table works. <html> <body> <?php if($variable == 'something'){ echo '<table> <tr> <td>title:</td> <td>'.$anotherVariable.'</td> </tr> <tr> <td>title:</td> <td> <input type="radio" name="flag" <?php if (isset($flag) && $flag=="full") echo "checked";?> value="full"> full <input type="radio" name="flag" <?php if (isset($flag) && $flag=="supported") echo "checked";?> value="supported"> supported <input type="radio" name="flag" <?php if (isset($flag) && $flag=="minimal") echo "checked";?> value="minimal"> minimal <input type="radio" name="flag" <?php if (isset($flag) && $flag=="none") echo "checked";?> value="none"> none </td> </tr> </table>'; } ?> </body> </html>
  6. right. answer here: http://forums.phpfreaks.com/topic/288107-not-sure-how-to-position-these-tables/?hl=php+table&do=findComment&comment=1477674
  7. hi, i am a total newbie. with some idiosyncratic knowledge of actionscript.. so please apologies if this has been answered before or if it so bleeding obvious.. trying searching but i dont really know what to search for.. why does this following simple code add space above the php code? it appears that every <tr> you add, the equivalent space appears above the php code: <html> <body> <table bgcolor="#FF9900" width="100%" border="0"> <tr> <td> <?php echo '<table width="100%"> <tr bgcolor="#FFFFF"> <td> say something </td><br/> <td> and something else</td> </tr> <tr bgcolor="#FFFFF"> <td> say something </td><br/> <td> and something else</td> </tr> <tr bgcolor="#FFFFF"> <td> say something </td><br/> <td> and something else</td> </tr> </table>' ?> </td> </tr> </table> </body> </html>
×
×
  • 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.