logo
down
shadow

Send a variable from one page to another in PHP


Send a variable from one page to another in PHP

By : Ravenshao Blackclaw
Date : November 22 2020, 11:12 AM
may help you . I am trying to send a variable value from one page to another. , make your var redirecturl=.. properly like this in your js function
code :
var redirecturl = "user-edit.php?useredit=<?php echo $uid;?>";


Share : facebook icon twitter icon
How to send variable to another php page?

How to send variable to another php page?


By : Sapta Ramdhani
Date : March 29 2020, 07:55 AM
I hope this helps you . You are passing the value correctly to the page , but you are not retrieving it on the other page.
On your testout.php do this change..
code :
<html>
<head>
<title>testout</title>
</head>
<body>
  getting irum1 = <?php echo isset($_POST['irum1']) ? $_POST['irum1'] : "Value not passed";?>
</body>
</html>
Xcode send variable with url to php page, retrieve variable in php code for the select statement

Xcode send variable with url to php page, retrieve variable in php code for the select statement


By : John BruceWayne Neit
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , The column phone is an INTEGER column? Because you can access to it without '' only if it is. If it is a VARCHAR, you have to change it to:
code :
$sql = "SELECT * FROM testable WHERE phone = '".$cid."'";
http://wwww.yourdomain.ext/phpPage.php?CategoryType=YOUR_VALUE
Send a variable to a PHP page and open the page in new tab

Send a variable to a PHP page and open the page in new tab


By : Sujit
Date : March 29 2020, 07:55 AM
seems to work fine
Main error is , window.open('preview.php'); loads the page preview.php ,
code :
  $(document).on('click', '#button', function(){
    var my_data = 'Test Test Tes';

    $.ajax({
      type: "POST",
      url: "preview.php",
      data: "my_data=" + my_data,
    });
  });
<?php
    if(isset($_POST['my_data']){
    $data= $_POST['my_data'];
    header('location:preview.php?my_data=$data');  //reload preview.php with the `my_data`
   }
   if(isset($_GET['my_data'])){
      $data=$_GET['my_data'];    
    echo $data;             //display `my_data` as you requested
   }
?>
$(document).on('click', '#button', function(){
    var my_data = 'Test Test Tes';
        window.open('preview.php?my_data='+my_data);
  });
<?php 
 if(isset($_GET['my_data'])){
        $data=$_GET['my_data'];    
        echo $data;          
 }
?>
<form action="preview.php" method="post">
  <input type="hidden" id="my_data" value="Test Test Tes">
  <button type="submit" id="button">post</button>
</form>
I am setting value in session variable in another page using ajax.What is the other way to send value to another page?

I am setting value in session variable in another page using ajax.What is the other way to send value to another page?


By : dajian
Date : March 29 2020, 07:55 AM
around this issue Hello my friend please use bellow code in ajax
data: { id: name2 },
How to send your variable from page to page via the controller

How to send your variable from page to page via the controller


By : Hernaldo Urbina
Date : March 29 2020, 07:55 AM
it helps some times The problem is your defining the title below the header so its not available in the header what you need to do i define it in the controller and pass it to the views $data['title']="Your Title"
code :
public function index()
{
    $data['data'] = $this->BookModel->get_author();
    $data['title]="your Header";
    $this->load->view('templates/header', $data);
    $this->load->view('home/index',$data);
    $this->load->view('templates/footer', $data);
}

in your view files you can access the key "title
Related Posts Related Posts :
  • How to fix "Object is possibly undefined"?
  • How can one use TensorFlow.js tf.data.generator for remote data sources since generators can't use callbacks
  • How can I unescape a string from python using javascript
  • How to add days into my date using angular pipe?
  • Keydown not firing on page loaded in <object> element
  • Refetch queries in react-native with graphql
  • How to execute functions across objects identically to executing the function itself with a this reference
  • NGRX Effect withLatestFrom Typescript error ts2345 troubleshooting
  • Make a checkbox checked if its id is present in an array
  • Remove disabled class when response code is 1 in each element javascript
  • Creating an input select in an editable form
  • How to convert string of ASCII codes to string of characters?
  • Detect system time and set css animation start time in browser
  • How can I build a dataTable, with a dropbox filter on top, calculated on backend?
  • What needs to be done to make multiple screen support for Javascript happen?
  • How to format a full year date/time
  • this.props.match.params passed into child component after authorisation
  • Highcharts: create multiple series grouped my month and year using JSON data
  • JS: Keep variable values for onclick event attached inside for loop
  • Failed prop type. Required prop types are undefined in my redux store
  • How to not import Vue in main js and store
  • Javascript make table with rows and columns given by user and change each cells colour onclick
  • How do you fix "ERROR in Path must be a string. Received undefined" in webpack4/copy-webpack-plugin
  • Protractor Fetching Email with Mail Listener: TypeError: deferred.fulfill is not a function
  • date-time picker bootstrap Tempus Dominus
  • How do I get all radio button id's via the name
  • Using d3 in for loop
  • Impact an array of objects
  • JS split string and return index of each split
  • Javascript/JS - Referring to classes and variables dynamically within a change event loop
  • Query a specific GET field?
  • Mapping multiple form inputs of the same name into a JavaScript object
  • How can I not to return a field from object in JavaScript?
  • Creating and testing a single Javascript nested function
  • Formatting server side jQuery Datatable
  • How to show tooltips onmouseover in p:calendar
  • typescript - calling function at random intervals in ionic
  • Correct way to populate an array from a promise
  • JavaScript Mini-Max Sum - Returns 0
  • canvas not clearing while radius of circle decreasing..?
  • Dynamically Growing Dropdown Component with clickoutside directive
  • MultichoiceField in ModelForm for Django with DB relations
  • React Native "if" statement behaviour? Early exit or full evaluation?
  • Call Jquery function on Input tag having data-slider
  • How to process negative shifts in Caesars Cipher (Javascript)
  • Animating Line position in Konva
  • Why a state is not resolved as a variable in nextjs
  • How to efficiently evaluate element in javascript array by using reduce function
  • Google script web app goes blank page after submit
  • Event for the load-end of dynamically added CSS files through innerHTML
  • How to retrieve some text from a sibling div element in jQuery
  • How to display half star rating in my following custom angular star rating example?
  • Angular 8: ternary operation for img src attribute?
  • Is this proper JS for this J-Query expanding textArea? Is 'this' the same as event.target in JS also?
  • How to fix user fetching from a collection in discord.js?
  • Can I create an item id when adding it to a collection?
  • Temporarily disable a specific option after it has been selected (in any selector) for all instances of that selector in
  • Vis.js timeline item align property not working
  • How to select one element instead of all elements using 'clicked' in a Django for loop
  • How to check if 2 <img> tags contain the same image
  • shadow
    Privacy Policy - Terms - Contact Us © festivalmusicasacra.org