Jump to content

ssailer

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ssailer's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I got it working <form action="sresults.php" method="post" name="sform" id="sform"> <div align="center"> <?php do { ?> <input name="fruitID" type="radio" value="<?php echo $row_getFruit['fruitID']?>" /> <?php echo $row_getFruit['fruitName']; ?><br /> <?php } while ($row_getFruit = mysql_fetch_assoc($getFruit)); $rows = mysql_num_rows($getFruit); if($rows > 0) { mysql_data_seek($getFruit, 0); $row_getFruit = mysql_fetch_assoc($getFruit); } ?> <input name="submit" type="submit" value="submit" /> </div> </form>
  2. Okay - I found some code that I have been able to get working, but where do I add the form tags within this code? I'm fairly new to PHP and it's not all making sense to me yet. Plus, there will probably be TONS of other form fields, not all of them dynamic, and I'm completely lost as to where to put them... <?php $query = "SELECT * FROM fruit ORDER BY fruitName ASC"; $result = mysql_query($query) or die('Error : ' . mysql_error()); $sid = (isset($_POST['role']) ? $_POST['role'] : ''); while($row = mysql_fetch_assoc($result)) { echo '<input type="radio" name="fruitID" value="' . $row['fruitid'] . '"' . ($sid == $row['fruitid']) . '>' . $row['fruitName'] . "<br>\n"; } ?>
  3. Ken - nothing is showing up on the page. Nothing at all. It's blank. Pikachu - with my code, only one radio button is showing up on the page and no title.
  4. I am trying to create a simple radio group based on the content of a MySQL table and it's not working. Can anyone help? <form action="" method="POST" name="form1" id="form1"> <?php do { ?> <input name="fruitID" type="radio" value="<?php echo $row_getFruit['fruitID']; ?>" /> <?php echo $row_getFruit['fruitName']; ?><br /> <?php } while ($row_getFruit = mysql_fetch_assoc($getFruit)); ?> </form>
  5. I am new to PHP and am setting up a database in PHP MyAdmin. I just can't figure out what field to type to assign to a field that I want to be a checkbox on my web site. A Yes/No, True/False field.
  6. I found a solution that is working. Involved a little bit of messing around, and it's not as clean as I'd like it to be, but it works.
  7. This outputs the directory: <?php $dirname = "Fireworks"; $dir = opendir($dirname); while(false != ($file = readdir($dir))) { if(($file != ".") and ($file != "..")) { echo("$file <br />"); } } ?> I really haven't gotten any farther than that. I have the select box created, but it's not working at all. <select name="dlfile" id="dlfile"> <option value="<?php echo $file ?>"><?php echo $file ?></option> </select> I am extremely new to PHP (I'm a ColdFusion developer, who has done this before with CF), and I do not know how to loop through a recordset. I know I need to use <?php do { ?> but I have no idea where to put it or how to loop through the $file. Thanks!
  8. I need to be able to list all of the files in a directory and then put all of those files in a listbox for a user to select from. I've been able to get the file list, but I can't figure out how to populate a list box with files from that list. Help, please?
  9. Ignace, thank you. It worked perfectly! I swear - I've been having trouble finding good working examples of some fairly common things with PHP
  10. I have a query which is using a date function to format an article date by month/year. My query is: SELECT `ID`, `title`, `content`, `articleDate`, `pdfDoc`, date_format(articleDate, '%M %Y') as monthYear from articles ORDER BY articleDate DESC"; The query is working fine, but I cannot figure out how to output it on screen grouped by month/year. I need it to look something like the following: August 2009 - Article Title - Article Title September 2009 - Article Title - Article Title I am a ColdFusion programmer who is trying to learn PHP and this is beyond my skill level right now... Thank you!
  11. This is the only error method I am receiving: Fatal error: Call to undefined method tNG_fields::tNG_fields() in C:\xampp\htdocs\PHP_CMS\includes\tng\tNG_insert.class.php on line 30 This is the code on the line where the error is occurring: function tNG_insert(&$connection) { parent::tNG_fields($connection); $this->transactionType = '_insert'; $this->exportRecordset = true; $this->registerTrigger("ERROR", "Trigger_Default_Insert_RollBack", 99); }
  12. I am a ColdFusion programmer who is very, very new to PHP. I have started using the Adobe Developer's Toolbox (ADDT) to assist me in learning PHP. However, I have just recently learned that ADDT is not compatible with PHP 5.3, which is what I have installed. Some ADDT features work with PHP 5.3, but many do not. My question is, now that PHP 5.3 is installed, how do I uninstall it and go back to PHP 5.2.9 without screwing up my entire system? I used XAMPP to install PHP in the first place. HELP!!!
×
×
  • 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.