Jump to content

Search the Community

Showing results for tags 'php quary mysql'.

  • 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. This is a snippet from a site i built the code is suppose to take information from a database and display it then if the user changes it via a drop down menu and an update button it will change the information and again display it. The first display labeled infants works correctly but then nothing else does. It all updates the DB like it is suppose to but just wont display it. I have been banging my head for days on this any help would be great. FYI This all worked properly for about 8 months then just one day stopped. mysql_query("update schedule set ".$field_name." = '".$_POST['infant_ch']."' where schedule_track_id = '".$track_id."' and employee = 'Enrollment' and class='infants' "); mysql_query("update schedule set ".$field_name." = '".$_POST['wobbler_ch']."' where schedule_track_id = '".$track_id."' and employee = 'Enrollment' and class='wobler' "); mysql_query("update schedule set ".$field_name." = '".$_POST['orange_ch']."' where schedule_track_id = '".$track_id."' and employee = 'Enrollment' and class='orange' "); mysql_query("update schedule set ".$field_name." = '".$_POST['green_ch']."' where schedule_track_id = '".$track_id."' and employee = 'Enrollment' and class='green' "); mysql_query("update schedule set ".$field_name." = '".$_POST['red_ch']."' where schedule_track_id = '".$track_id."' and employee = 'Enrollment' and class='red' "); mysql_query("update schedule set ".$field_name." = '".$_POST['blue_ch']."' where schedule_track_id = '".$track_id."' and employee = 'Enrollment' and class='blue' "); mysql_query("update schedule set ".$field_name." = '".$_POST['purple_ch']."' where schedule_track_id = '".$track_id."' and employee = 'Enrollment' and class='purple' "); mysql_query("update schedule set ".$field_name." = '".$_POST['yellow_ch']."' where schedule_track_id = '".$track_id."' and employee = 'Enrollment' and class='yellow' "); mysql_query("update schedule set ".$field_name." = '".$_POST['silver_ch']."' where schedule_track_id = '".$track_id."' and employee = 'Enrollment' and class='silver' "); mysql_query("update schedule set ".$field_name." = '".$_POST['school_ch']."' where schedule_track_id = '".$track_id."' and employee = 'Enrollment' and class='clubhouse' "); $enroll_query = mysql_query("select * from schedule Where employee = 'Enrollment' and CURDATE() between start_date and end_date and schedule_track_id = '".$track_id."' "); while($data = mysql_fetch_assoc($enroll_query)) { $enroll_data[] = $data; } $new_field_name = $field_name.'_s'; // This is the display section// <td align="center" valign="top"><table width="90" border="1" cellpadding="0"> <tr> <td height="200" align="center" valign="middle"><label for="infant_ch"></label> <select name="infant_ch" id="infant_ch"> <?php if($enroll_data[0]['class'] == 'infants') { $data_field = $enroll_data[0][$field_name]; for($i=0;$i<=30;$i++) { ?> <option value="<?php echo $i; ?>" <?php if ($i==$data_field) { echo "selected";}?>><?php echo $i; ?></option> <?php } } else { for($i=0;$i<=30;$i++) { ?> <option value="<?php echo $i; ?>" ><?php echo $i; ?></option> <?php } } ?> </select></td> </tr> <tr> <td height="200" align="center"><label for="wobbler_ch"></label> <select name="wobbler_ch" id="wobbler_ch"> <?php if($enroll_data[1]['class'] == 'wobler') { $data_field = $enroll_data[1][$field_name]; for($i=0;$i<=30;$i++) { ?> <option value="<?php echo $i; ?>" <?php if ($i==$data_field) { echo "selected";}?>><?php echo $i; ?></option> <?php } } else { for($i=0;$i<=30;$i++) { ?> <option value="<?php echo $i; ?>" ><?php echo $i; ?></option> <?php } } ?> </select></td> </tr> <tr> <td height="200" align="center"><label for="orange_ch"></label> <select name="orange_ch" id="orange_ch"> <?php if($enroll_data[2]['class'] == 'orange') { $data_field = $enroll_data[2][$field_name]; for($i=0;$i<=30;$i++) { ?> <option value="<?php echo $i; ?>" <?php if ($i==$data_field) { echo "selected";}?>><?php echo $i; ?></option> <?php } } else { for($i=0;$i<=30;$i++) { ?> <option value="<?php echo $i; ?>" ><?php echo $i; ?></option> <?php } } ?> </select></td> </tr> <tr>
×
×
  • 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.