473,385 Members | 1,396 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Variable Passing Not Sending Complete Name

I have a PHP script which simply calls another PHP script using
include(). Let's call them website.php and website_include.php, with
website.php simply including website_include.php. I can pass the
variable to website.php fine. Using an echo command, I can see that it
has the complete phrase such as "Permission Denied." When I call the
website_include.php, which is the page that actually does all the
work, the variable has changed to just "Permission." This happens with
any phrase I send. I am using the following syntax to call
website_include.php:

include("http://www.domain.com/website_include.php?variable=$phrase)

Right now, at the top of website.php and website_include.php I have a
$_GET statement to capture the variable. I have tried various
combinations of one page having it and the other not having. Having
the $_GET statement on both pages is the only way it has worked for me
so far. Any help will be greatly appreciated.

Aug 15 '07 #1
1 1211
Rik
On Wed, 15 Aug 2007 16:24:15 +0200, Jerim <wy****@gmail.comwrote:
After playing around with it a bit, here is what you were trying to
say:

On website.php catch the variable using
$variable=rawurlencode($_GET['variable']);
Then when you call the include, pass the variable: include("http://
www.website.com/directory/website_include.php?variable=$variable");
Well, preferably don't include by HTTP, but this will work.
--
Rik Wasmus
Aug 15 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Gregory | last post by:
Hello, I'm trying to do the above in order to process an image and return the result to an html image control. It fails and my key suspects are either the variable that I'm passing in -...
2
by: Ian Hubling | last post by:
Here's what I'm trying to do: I have a large number of pages that call a pop-up survey page. It is important to know what page the survey is referring to - so I am passing the name of the...
9
by: Max | last post by:
I'm new with Javascript and can't seem to figure out what I'm doing wrong here as I'm not able to pass a simple variable to a function. In the head of doc I have: <script...
2
by: Gvs | last post by:
Hi, I'm currently trying to pass messages into a queue. This all works fine, however, i'm trying to my program to stop sending messages to the queue when it reaches an upper threshold. At...
1
by: Marty Meyers | last post by:
TIA for your help! I have a page (code snip below) named "browse" which has a table in it with rows like this: 2003 1500 Silverado pickup red 51,024 $19,995 Details --------- each row...
20
by: weston | last post by:
I've got a piece of code where, for all the world, it looks like this fails in IE 6: hometab = document.getElementById('hometab'); but this succeeds: hometabemt =...
14
by: needin4mation | last post by:
I have this in my web service: public XmlDocument GetDataFromDB(string name) { .... do some stuff with name variable..on the database... return the XmlDocument to my datagrid; } Now, in my...
2
by: JWest46088 | last post by:
I'm making a contact form, and I keep getting two errors when I try previewing it in a web browser. ReferenceError: Error #1065: Variable Button is not defined. ReferenceError: Error #1065:...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.