Jump to content

tcorbeil

Members
  • Posts

    122
  • Joined

  • Last visited

    Never

Everything posted by tcorbeil

  1. 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.
  2. Is there a way to do this? apparently ltim only removes spaces? Thanks. T.
  3. <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.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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.
  9. Interpim, I think i got it.. see the thread Page Title that i started.. Thanks for your help! T.
  10. That should do it Frost! Thank you! T.
  11. Interpim, could the variable not equal the value of the page that is loaded? rather than give each page a ID variable?
  12. 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.
  13. 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.
  14. 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.
  15. 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.
  16. actually sorry, where it is listed 'Entertainment', it should read 'main'
  17. 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.
  18. 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
  19. 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.
  20. 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.
  21. Hello everyone. Is there a command or a procedure to get a page title and assign it to a php variable? Thanks. T.
×
×
  • 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.