Jump to content

Search the Community

Showing results for tags 'populate combobox'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hi Good day Can someone pls help me regarding with this matter. I have a page for inserting records. And I have a combobox that is fetched through the specific field in database. I also have a table of records, for each row i have an href edit which throws the values to its respective texbox and combobox. THE PROBLEM is that when i click the href edit, the value from a selected row was not displayed from the combobox but with the textboxes it is working except from the combobox which is already fetched from the database. ------> HERE IS THE CODE FOR COMBOBOX <select name="cbocourse" style="height:35px; width:280px; background-color:#923227; box-shadow:1px 1px #FFF;color:#C90;"> <?php $sql = 'SELECT * from tblcourse'; $query = mysql_query($sql); while($row = mysql_fetch_array($query)) { echo '<option value= "' . $row['id']. '">' . $row['course'] . '</option>'; } ?> <?php if(@$courseid ==5){ echo "<option value = '5'>Associate in Computer Technology/option>"; } ?> ------> CODE FOR TABLE OF RECORDS do{ echo '<tr>'; echo "<td><a href = 'fastormain.php?id=".$result['id']."'onclick=\" disableupdatebtn();\"> ". '<center>' . "edit" . '<center>' ."</a></td>"; echo "<td><a href = 'fastormain.php?id=".$result['id']."&action='delete' onClick=\"return confirm('Do you want to delete this record?')\">". '<center>'."delete" . '</center>'."</a></td>"; echo '<td>' . $result['id'] .'</td>'; echo '<td>' . $result['Name'] .'</td>'; echo '<td>' . $result['gender'] .'</td>'; echo '<td>' . $result['birthday'] .'</td>'; echo '<td>' . $result['address'] .'</td>'; echo '<td>' . $result['contactnumber'] .'</td>'; echo '<td>' . $result['course'] .'</td>'; echo '<td>' . $result['branch'] .'</td>'; echo '<td>' . $result['YEAR'] .'</td>'; echo '<td>' . $result['imagename'] .'</td>'; echo '</tr>'; $result= mysql_fetch_assoc($query); } while($result);{ ----------------> AND THE CODE FOR GETTING THE ID IN HREF ?php if(isset($_GET['id'])) { $id = $_GET['id']; $sql = "select * from tblcontestants where id = {$id} limit 1"; $query = @mysql_query($sql,$connection) or die("DATABASE QUERY FAILED"); $result = mysql_fetch_assoc($query); $id=$result['id']; $fname=$result['fname']; $mname=$result['mname']; $lname=$result['lname']; $age=$result['age']; $genderid=$result['genderid']; $birthday=$result['birthday']; $address=$result['address']; $contactnumber=$result['contactnumber']; $courseid=$result['courseid']; $branchid=$result['branchid']; $yearid=$result['yearid']; $imagename=$result['imagename']; }; ?> I KNOW THAT SOMEONE CAN HELP ME! SO PLEASEEEEEEE! IT WILL BE HIGHLY APPRECIATED
×
×
  • 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.