Jump to content

Recommended Posts

Did a bit of research on Google... try this.

 

 

<?php
ob_start();
include 'filetoinclude.php';
ob_end_clean();
?>

 

That way, you can prevent the file you're including to output data and still access the script usually.

You could use a header?

 

Example:

 

<?PHP

  $name = 'Peter';
  $city = 'Canada';
 
  header('Location: file.php?name='.$name.'&city='.$city.');
  exit;
 
?>

 

That would re-direct you to "file.php?name=Peter&city=Canada".

You would need to use the above code BEFORE any output.

You could use a header?

 

Example:

<?PHP

  $name = 'Peter';
  $city = 'Canada';
 
  header('Location: file.php?name='.$name.'&city='.$city.');
  exit;
 
?>

That would re-direct you to "file.php?name=Peter&city=Canada".

You would need to use the above code BEFORE any output.

 

Thanks for that info. But the user will be redirected to a file I don't want them to be redirected to.

The code I gave you is not meant to be put into production, it is an EXAMPLE.

 

Modify it to suit your needs?

 

From your other post I saw "order_confirmation.php"

 

You could use

<?PHP
 
  $orderID = 12345;
 
  header('Location: order_confirmation.php?order_id='.$orderID.'');
  exit;
?>

*Edit - I have a feeling I'm missing something...or just not getting what you've said?

Edited by PaulRyan

Did you see the responses to the same question you asked yesterday?

http://forums.phpfreaks.com/topic/281862-passing-a-get-value-with-out-href-links/

 

If these don't work, it might help if you provide a little more information on what you're trying to accomplish.

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.