Jump to content

Recommended Posts

Is there a way to make a url that changes a field from 1 to 0?

 

I have a "ID" field and a "print_status" field.

 

something like

 

?rid=<?php echo $row['id'];];  then the something to modify "print_status" to =0.

 

I am not good a php as you can tell.  lol.  I usually just modify till I get it to do what I want.  Learning as I go.

I'm not quite sure what you mean, but you can pass additional variables through the url so that it looks like this:

 

index.php?rid=5&print_status=0

 

And you can get those values like this:

 

<?php 
$rid = $_GET['rid']; 
$print_status = $_GET['print_status'];
?>

 

Don't forget to sanitize your input though.

I'm not quite sure what you mean, but you can pass additional variables through the url so that it looks like this:

 

index.php?rid=5&print_status=0

 

And you can get those values like this:

 

<?php 
$rid = $_GET['rid']; 
$print_status = $_GET['print_status'];
?>

 

Don't forget to sanitize your input though.

 

So if I make say a index.php file and do

index.php?rid=5&print_status=0

 

I understand your code where you GET the code from the url, but what do you use to make the modify to change print_status=0

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.