tcorbeil
Members-
Posts
122 -
Joined
-
Last visited
Never
Everything posted by tcorbeil
-
Thanks alot! T.
-
Hi again everyone. I appreciate all of your help.. I feel i have come a long way and couldn't do it with you. Anyway, i have another question: From my main site, I call a php file to dump my data into mySQL.. The problem is, the page does it's thing but stays white as it completes it's task.. what command would I use to redirect to the page i came from? Also, as this php file will be call by many different pages, can i use a variable such as : redirect to variable ... variable being the exact address of where I want to go.. Can this be done? Thanks again. T.
-
Is there a way to do this? apparently ltim only removes spaces? Thanks. T.
-
<div id="invertedtabs"> <ul> <li style="margin-left: 1px"><b><a href="#" onclick=http://www.xxxxxxx.com/form.php title=""><span>FORM</span></a></b><br /> </DIV> notes: this is a tabs bar code taken from another site.. I modified it in the attempt to past my form on the current page with the hopes to use onclick.. T.
-
In my HTML I want to fetch a php file (the php file is a form for a user to fill out) but I want the form pasted on my page but instead it ries to open the form page in a new window of it's own... I tried href but also include.. I don't know that I am using the include properly.. any ideas? Thanks. T.
-
It seems that most instances where I have seen variables passed were from HTML script (eg href="script.php?myvalue")to another page.. I gues in my situation I'm looking to pass a variable from a php script .. is this maybe why I am not getting anywere? In my previous post, you will see how I am trying to pass the varible.. maybe this is not possible? Thanks. T.
-
I noticed that your include does not have let's say ?$myVariable at the end of the php file.. am i missing something? Also, you mention to echo $myVariable but can I do something like: $var2 = echo $myVariable; Thanks. T.
-
Ok so i do this: <? $Page=$_SERVER['SCRIPT_FILENAME']; include("http://www.xxxxxxx.com/Global/posting.php?$Page"); ?> Now, in posting.php, i believe i tried a few things the retreive the variable value of $Page but wasn't succesfull.. can someone enlighten me? thanks. T.
-
Ok.. run into a new problem... I have a page that calls an external script for processing and I need a variable from the main page to be available in the external script.. Is there a way to pass a variable from the main page into the external script? Or if not, is there a way to make the variable global os something? Thanks. T.
-
Interpim, I think i got it.. see the thread Page Title that i started.. Thanks for your help! T.
-
That should do it Frost! Thank you! T.
-
Interpim, could the variable not equal the value of the page that is loaded? rather than give each page a ID variable?
-
Thanks for the replies.. actually, it is the opposite that I want.. Let's say I have a huge datatbase on mySQL. Within it I have a table called 'Entertainment'.. that table would look something like : Here are the colums... Index Page title some data here some data here -------------------------------------------------------------------------- Here are the rows filled out as such.. 1 xbox.php xxxxxxxxxxx xxxxxxxxxxx 2 nintendo.php xxxxxxxxxxx xxxxxxxxxxx 3 sony.php xxxxxxxxxxx xxxxxxxxxxx 4 xbox.php xxxxxxxxxxx xxxxxxxxxxxx The pages xbox.php, nintendo.php, sony.php all belong to my site. Right now I retreive the entries with: (assuming I am loading www.xxxx.com/xbox.php) $index_id="xbox.php"; $query="SELECT * FROM `Entertainment` WHERE Page ='$index_id'"; $result=mysql_query($query); So when I print the display on the screen, only the entries that list xbox.php are listed from the table.. Now this works.. but, I have to declare that variable "$index_id" beforehand.. Because my site will have many pages with different names to them, I don't want to edit them all when I make minor changes.. If i could do something like: (Again, assuming I'm loading the page www.xxxx.com/xbox.php) $index_id= fetch the name of the page that is currently loading (in this case xbox.php) $query="SELECT * FROM `Entertainment` WHERE Page ='$index_id'"; $result=mysql_query($query); So that ultimatley if I have another page called sony.php, I don't have to change the value of $index_id.. it just fetched the value on it's own and retreives, from my table, the appropriate info.. Again, thanks to all for your help. T.
-
I am trying to grab content relevant to the page I'm viewing.. The page title would determine what content to grab from the database.. T.
-
Here is a piece of code interpim: $query="SELECT * FROM `Entertainment` WHERE Page ='$index_id'"; $result=mysql_query($query); This works good if i declare the variable prior: $index_id = "xbox.php" (where xbox.php = to the name of the current page I'm viewing in a browser and is also a value in mySQL under 'page' column in a table called Entertainment) I tried doing $index_id = $_GET['ID'] as you mentioned but it didn't work.. Aside from me declaring the the $index_id variable should be equal to the page name I am on, how do I make $index_id variable get the page name automatically? (ex. if I'm in IE and I'm viewing a site called www.xxxx.com/xbox.php, i would want $index_id to be assigned the value xbox.php) I'm still stuck.. Thanks for your patience. T.
-
I have another post on here for this problem but I think I have overcomplicated the matter.. Ok in it's simplest form: Is there a way to retrieve the current page title and place it into a PHP variable? something like" $pagetitle = **** Title of the current page I'm viewing **** Thanks in advance. T.
-
actually sorry, where it is listed 'Entertainment', it should read 'main'
-
sorry.. hit the wrong button and submitted too soon.. here is the full message..: Ok so let's say I have this: my SQL table called 'main'. In main I have colums such as: index page name content 1 content 2 ----------------------------------------------------- 1 aaaa blahblah blahblah 2 bbbb blahblah blahblah 3 cccc blahblah blahblah 4 aaaa blahblah blahblah 5 cccc blahblah blahblah 6 aaaa blahblah blahblah Ok, so I want to retrieve the page name such as for example, 'aaaa' and use the select command to query mySQL and pull all the information on the rows listed aaaa.. I tried your suggestion but i may need more info to implement the code.. right now I have: $query="SELECT * FROM `Entertainment` WHERE 1"; and it works.. only thing is, I need a table for every page.. Thanks again for the help. T.
-
Ok so let's say I have this: my SQL table called 'main'. In main I have colums such as: index page name content 1 content 2 ----------------------------------------------------- 1 aaaa
-
Thanks for your replies. Actually I do get the PHP doing the work concept.. I have many pages for my own website and a database storage for each page.. I was hoping to use the page title to store into a php variable so then I could retrieve the information required from the appropriate database (given name by the page title..) There might be another way of doing this but so I welcome any other suggestions to the matter. Basically something like this in english: The setup: Database has several table aaaa, bbbb, cccc. 1) PHP script: get page title and store in a variable called $pageID (page title is cccc) therefore $pageID = cccc 2) php script to get all information in mySQL under cccc and return to print on website Note: Because all pages are going to be generic and reading into an external php script, I don't want to assign a specific variable to a page (too many pages to edit) I want to be able to get the page ID and run with that.. Is this doable or is there a better way? Thanks T.
-
Ok.. I confess that I'm a newbie with respect to PHP.. I your code, let's say I open up the webpage google.ca.. The page title is google... in the code you presented, would the variable $title = google? If this is the case, then yes this is what I'm after.. Thanks.
-
Hello everyone. Is there a command or a procedure to get a page title and assign it to a php variable? Thanks. T.