Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9197687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:07:46+00:00 2026-06-17T22:07:46+00:00

I want to update data to mysql database i know the query. query is

  • 0

I want to update data to mysql database i know the query. query is not a problem..

The Problem i am facing is that how should i send id page to other page..

lets suppose i am on page skill_edit.php?id=7
and i click update button then it goes to skills.php from skill_edit.php using POST method of form.

but now how can i send id of page or even id of row in table to “skills.php”

My Database:

enter image description here

My Form in skill_edit.php

     <form class="form-horizontal row-fluid" method="post" action="skills.php">

        <?php //Skill Name ?>
        <div class="form-row control-group row-fluid">
          <label class="control-label span3" for="with-placeholder">Skill Name</label>
          <div class="controls span7">
            <input type="text" name="skill_name" id="with-placeholder" class="row-fluid" value="<?php echo $showskillname; ?>">
          </div>
        </div>

       <?php //Skill Description ?>
        <div class="form-row control-group row-fluid">
          <label class="control-label span3" for="elastic-textarea">Skill Desc <span class="help-block">My Skill Description</span> </label>
          <div class="controls span7">
            <textarea name="skill_desc" rows="3" style=" height:80px;"  class="row-fluid autogrow" id="elastic-textarea"><?php echo $showskilldesc; ?></textarea>
          </div>
        </div>

        <?php //Selecting Language ?>
        <div class="form-row control-group row-fluid">
          <label class="control-label span3">Select with search</label>
          <div class="controls span7">
            <select name="skill_rating" data-placeholder="Choose a Language...." class="chzn-select">
              <option value="<?php echo $showskillrating; ?>"><?php echo $showskillrating; ?></option>
              <option value="1">1 Star</option>
              <option value="2">2 Star</option>
              <option value="3">3 Star</option>
              <option value="4">4 Star</option>
              <option value="5">5 Star</option>
            </select>
          </div>
        </div>


       <?php //Buttons ?>
        <div class="form-actions row-fluid">
          <div class="span7 offset3">
            <button name="updatebtn" style=" float:left; margin-left:40px;" type="submit" class="btn btn-primary">Save changes</button>
            <button formaction="skills.php" style=" float:right; margin-right:40px;" type="submit" class="btn btn-secondary">Cancel</button>
          </div>
        </div>
      </form>

my skill.php page on which i get the data

if(isset($_POST['updatebtn']))
{
$updatedskillname = mysql_real_escape_string($_POST['skill_name']);
$updatedskilldesc = mysql_real_escape_string($_POST['skill_desc']);
$updatedskillrating = mysql_real_escape_string($_POST['skill_rating']);
$last_updated = mysql_real_escape_string(date('F j, Y, g:i a'));

$update=update_skill($updatedskillname, $updatedskilldesc, $updatedskillrating, $last_updated);
}

Here is the inside of the function

//Update Skill
//skills.php
function update_skill($updatedskillname, $updatedskilldesc, $updatedskillrating, $last_updated)
{
        $query="UPDATE cv_skills SET
                            skill_name='$updatedskillname',
                            skill_desc='$updatedskilldesc',
                            skill_rating='$updatedskillrating',
                            last_updated='$last_updated' WHERE skill_id='$pageid'";
$result=mysql_query($query);
$error=mysql_error();

return $error;
}

so how can i get skill_id in my query??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T22:07:47+00:00Added an answer on June 17, 2026 at 10:07 pm

    There’s a couple possible ways you can do this but one would be to do:

    <form class="form-horizontal row-fluid" method="post" action="skills.php?id=<?php echo $_GET['id']; ?>">
    

    This will then post back to itself with the id still in tact. The other way would be you could use a hidden field so you POST the id back to the form.

    Hidden:

    <input type="hidden" name="id" value="<?php echo $_GET['id']; ?>">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My customer doesn't want a database but would prefer to update their data in
I have MySQL database server I need to update and retrieve data to/from MySQL
I want to create counters in MySQL database that stores the number of views
How do I fill an inputbox with mysql data. So that I can update
I've got a minor problem with a database admin page that I use to
I want to update a text field in my mysql database but it doesn't
I have a mysql database table that I want to partition by date, particularly
I want to load data from several CSV documents in a database. The problem
We have a product that uses a MySQL database as the data-store. The data-store
i have ios application with xcdatamodeld, i want update some data so need a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.