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

  • SEARCH
  • Home
  • 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 6675873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:54:55+00:00 2026-05-26T03:54:55+00:00

I have problem to pass value via url parameter to other page. I want

  • 0

I have problem to pass value via url parameter to other page. I want to reject a booking based on selected bookingID by clicking REJECT button. But the bookingID value do not pass to other page, the url appear like this http://localhost/tablesortapprovebook/approve_booking.php?bookingID=

Here is my coding segment:

index.php

<head>
<script src="jquery-latest.js" type="text/javascript"></script>
<script src="jquery.tablesorter.js" type="text/javascript"></script>
<script>
$(document).ready(function() {
$("#myTable").tablesorter({widgets: ['zebra']});
});

$(document).ready(function() 
{ 
    $("#myTable").tablesorter(); 
} 
);

$(document).ready(function() 
{ 
    $("#myTable").tablesorter( {sortList: [[0,0], [1,0]]} ); 
} 
);
</script>
<link href="style.css" rel="stylesheet" type="text/css">
<link href="stylelogin.css" rel="stylesheet" type="text/css">
</head>
<body>

<?php

include("dbconfig.php");

$query = "SELECT customer.companyName, customer.contactName, eventinfo.eventTitle,boothAlias,date, testbook.bstatus, testbook.username, bookingID  from eventinfo, testbook, customer where testbook.username=customer.username AND testbook.eventID=eventinfo.eventID";

$o = '<table id="myTable" class="tablesorter" width="930px"><thead><tr><th>Company Name</th><th>Contact Name</th><th>Event</th><th>Booth</th><th>Date</th><th>Status</th></tr></thead><tbody>';



$result = mysql_query($query);
        while($row=mysql_fetch_array($result))
        {
        $boothAlias=stripslashes($row["boothAlias"]);
        $eventTitle=stripslashes($row["eventTitle"]);
        $date=stripslashes($row["date"]);
        $bstatus=stripslashes($row["bstatus"]);
        $companyName=stripslashes($row["companyName"]);
        $contactName=stripslashes($row["contactName"]);
        $bookingID=stripslashes($row["bookingID"]);


if($bstatus==0){
    $status="Pending";
}else if($bstatus==1){
    $status="Successful";
}else{
    $status="Reject";
}


$o .= '<tr><td width="120px">'.$companyName.'</td><td width="120px">'.$contactName.'</td><td width="180px">'.$eventTitle.
'</td><td width="70px">'.$boothAlias.'</td><td width="170px">'.$date.'</td><td width="70">'.$status.'</td><td>'.$bookingID.'
</td><td width="100"><input type="hidden" name="bookingID" value="<?php echo $bookingID; ?>" ><a href="approve_booking.php?bookingID=".$bookingID.
" name="REJECT" id="REJECT"><input width="100px" name="REJECT" type="submit" id="REJECT" value="Reject"></a></td></tr>';
}

$o .= '</tbody></table>';

echo $o;
?>

</body>

approve_booking.php

<?php

mysql_connect("localhost", "root", "") or die (mysql_error());
mysql_select_db("eventdb") or die (mysql_error());

$booking=$_GET['bookingID'];
echo $booking;

if(isset($_POST['APPROVED']))
    {

        $query2 = "UPDATE testbook SET bstatus ='0' WHERE bookingID='$booking'";
            $result2 = @mysql_query($query2);
    }


if (isset($_POST['REJECT']))
    {
        $query3 = "UPDATE testbook SET bstatus ='2' WHERE bookingID='$booking'";
            $result3 = @mysql_query($query3);

    }



?>
  • 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-05-26T03:54:55+00:00Added an answer on May 26, 2026 at 3:54 am

    I don’t really know what your problem is but try $_REQUEST[‘….’] instead of $_GET[‘…’].

    By the way, you have a SQL injection vulnerability:

    $booking=$_GET['bookingID'];
    

    Replace that with:

    $booking=mysql_escape_string($_GET['bookingID']);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I Have two problem in this Case : I want to pass a JSON
I have this little problem, that I cannot figure out which arguments to pass
I have problem with fancybox. I want to write a function that will run
I have problem with cakephp's Session->write method. If I set a value like $_SESSION['..']
I have problem with HTTP headers, they're encoded in ASCII and I want to
Could you guys help me I have a problem with deserialization via IXmlSerializable var
I have problem on passing jquery variable on codeigniter controller. actually i want to
I have problem creating new instance of excel 2007 using VBA (from Access 2002).
i have problem with autorotate on iphone i set up in all classes -
I have problem with displaying adsense ads in ie7 google adsense adds an iframe

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.