473,405 Members | 2,373 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,405 software developers and data experts.

how to attach together with the query in include

65
Hi,

I will like to know how to i attach together with the query in the include..

eg.

Expand|Select|Wrap|Line Numbers
  1. include "main.php";
  2.  
but if i attach together with the query, it is cant work..

Expand|Select|Wrap|Line Numbers
  1. include "main.php?id=$infoid";
  2.  
Can someone guide me..??
Oct 29 '07 #1
1 1204
Atli
5,058 Expert 4TB
Hi Wish.

The GET protocol is a HTTP Protocol, which is only available in HTTP Requests.

The include() function is used to load code from a local resource. So if you ask for 'file.php?var=hello' it will look for a file called exactly that rather than 'file.php'.

Note that the include() function will load the code from the file into the current script so if you need to import a variable into that code you could do something like this:

inc.php
Expand|Select|Wrap|Line Numbers
  1. <?php
  2.   echo $myVar;
  3. ?>
  4.  
index.php
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. $myVar = "Hello World!";
  3. include("inc.php");
  4. ?>
  5.  
Will print 'Hello World!".
Oct 29 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Bob Bedford | last post by:
I'm trying to add an imagejpeg result as an attachment of an email. For creating the email I'm using phpmailer class (http://phpmailer.sourceforge.net/) Now I do create an image from a jpeg file...
3
by: Wizard | last post by:
In Access, using VBA, I am sending emails based on query results. These email include relevant information to a scheduled event the recipient is assigned to. This is working great. What I have...
5
by: erez | last post by:
Hello How can i attach an html file to TableRow in HtmlTable control that run at server, the code should be in server side. thanks
2
by: julia777 | last post by:
hello everyone i am the worst newbie that exists,,.. and on top my english is terrible ! i hope someone can help me :) I need to attach .BAK db MS SQL 2000 with enterprise manager I have a file...
1
by: akhilkes | last post by:
i m working on a dynamic query analyzer , which process queries of user , is it possible to attach components in java panel at run time because i want the program process the query and generates the...
2
by: asianstreet | last post by:
How do you NOT display a field when the record is not selected? School Name: AAA BBB CCC DDD or ALL Schools when i select AAA, the result would be only: Student: GPA School Name...
1
by: dixcyn04 | last post by:
Ok, now I've run into another little hiccup in my application. The ability to update records already in existance. What is bugging me about this, is the code I will submit was what I found on forums...
2
by: Lisa.Lundergan | last post by:
I have a query (crosstab) that has week beginning dates in the first column then Monday - Friday in the following columns. The values are names of assignments. It is set up like a 5-day calendar...
1
by: Akino877 | last post by:
Hello, I have a short Visual C++ program which creates a window. My program is as follows : #include "stdafx.h" #include <afxwin> class COurApp : public CWinApp {
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.