Web Hosting Vodahost    

Home Take The Royal Tour! Order Now Features Prices
Go Back   Web Hosting > VodaHost Web Hosting Support > mySQL & PHP

Notices

mySQL & PHP Discussions, information and help with mySQL and PHP.

Reply
 
LinkBack Thread Tools
  #1  
Old 03-25-2008, 07:10 PM
Second Lieutenant
 
Join Date: Feb 2008
Posts: 120
Default database Queries with PHP

Hello
im trying to make something like in this site : www.craigslist.com

after the information was queierd and put into a table on my page (with php) you have the Title as a link that i want the link to open a new page that there you can see (or even add more information) about what the user posted .

is there a way to make the page/computer/php code to remember on what the user pressed and take all the information and "print" it on the screen in another page

wow i hope i didnt mess it up too much

thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2  
Old 03-25-2008, 09:58 PM
Vasili's Avatar
Generalissimo
 
Join Date: Mar 2006
Posts: 9,255
Arrow Re: database Queries with PHP

You have set a budget for this, correct?

This involves custom programming/coding, and if you are looking to do this on the cheap you are quite mis-guided......to get what you want, ABVFP can only do so much, and what you are modelling after is a different animal altogether!

You may inquire with General Navaldesign, and also explore the possibilities by creating a free account at and posting a job to www.odesk.com to see what kinds of bids come in.......you will definitely need to be clearer and detailed to fully describe the parameters of your project, no matter who agrees to undertake it on your behalf!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old 03-25-2008, 11:12 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 9,024
Default Re: database Queries with PHP

Well, it is rather simple. You can include in the link (at the end) a ?id=999&name=George&town=Texas etc. This is using the GET method to pass the variable names and values to the new page. In this new page you will capture your variables with the following:

id = $_GET['id'];
name = $_GET['name'];
etc for all passed variables and values
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old 03-26-2008, 01:47 AM
Second Lieutenant
 
Join Date: Feb 2008
Posts: 120
Default Re: database Queries with PHP

thanks alot ill try that
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old 03-26-2008, 04:44 PM
Second Lieutenant
 
Join Date: Feb 2008
Posts: 120
Default Re: database Queries with PHP

hi
naval,one more question i want to ask , when im adding this line :
?id=999&name=George&town=Texas
can i write a code that will automaticaly store the var' from the database ?

let me try to explain with an example :(database colum)
date (submission_date).......... title(posting_title)
2/08 ..................................."hello my name is"

the title "hello my..." is a link that i want it to be opened in a new page that i can extract all the nessesary information.

can i include in that link the php code that will store for each row of my table that var' i need to use after

thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old 03-26-2008, 05:22 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 9,024
Default Re: database Queries with PHP

Nor sure i follow you. Please rephrase.
Also, the part " ?id=999&name=George&town=Texas " is NOT a line. it is an addition to the links that you create (the Title..) to go to the next page.
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old 03-26-2008, 05:41 PM
Second Lieutenant
 
Join Date: Feb 2008
Posts: 120
Default Re: database Queries with PHP

hi
in this continuation ?id=999&name=George&town=Texas
there are already fixed var'=999 =George... after the "="
i wanted to know if i can add to the PHP code a command that will put in each row the correct variables for the link
something like :

link...?id=$_GET['id']&name=$_GET['name') etc.(still in the same page from the database)

10x
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old 03-26-2008, 06:08 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 9,024
Default Re: database Queries with PHP

You can put variables, but not this way, because the $_GET global doesn't already exist, it will exist in the next page. You can do it like

$link = "http://www.yourdomain.com/pagename.php?id=$row[id]&name=$row[name]&.... " etc. Then, use $link to link your Title to the next page. passing also the variables attached with the extension.

where $row obviously is the array that contains the data from the database.
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old 03-26-2008, 06:37 PM
Second Lieutenant
 
Join Date: Feb 2008
Posts: 120
Default Re: database Queries with PHP

hi
working ok...but one problem
on the address (explorer) bar it shows me the information also
like : www........../pagename.php?id=ron&address=1234 rebeca st.
and i have 1 colum that is the post itself can be 100 words even and it will show up also in the adress(link )
www...../pagename.php?posting=aaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaid =999

and so on
can i do something that it wont show that ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old 03-26-2008, 06:48 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 9,024
Default Re: database Queries with PHP

Why shouldn't it display the info ? I mean, if in the next page you ARE going to display it, why not display it also in the address bar ?

Anyway, you can use another method: in the first page, where you retrieve the info from the database, store it in $_SESSION (you will need to start the session at the very begining of the page).
So you will have at the start of page

<?
session_start();
....................
....................

$_SESSION[id] = $row[]id;
$_SESSION[name] = $row[name];
etc.


In the next page,

<?
session_start;
$id = $_SESSION[id];
$name = $_SESSION[name];

etc.

Now you have your values stored in $id, $name etc. Or use directly the $_SESSION[....] if you don't wont to store them in local variables.

The link from the first to the second page now becomes a simple link. No ?id=...&... anymore

Anyway, please look in the net for some php / mysql tutorials, or buy some book that explains all the above, this forum cannot become a php teaching site, becuase this is not its scope. It is not a general interest argument.

Please also note that your logic is wrong, if you need to pass values to the next page you should only pass the record id nr, then in the next page, you should (again) retrieve the info directly from the database, quering the database ONLY for that id number.
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #11  
Old 03-26-2008, 06:51 PM
Second Lieutenant
 
Join Date: Feb 2008
Posts: 120
Default Re: database Queries with PHP

thats nicer way i suppose cus you wont have a link soooo LONG more decorative

and i want to thank you for your help !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12  
Old 03-26-2008, 07:02 PM
Second Lieutenant
 
Join Date: Feb 2008
Posts: 120
Default Re: database Queries with PHP

what does it mean ?

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/rgajsgjb/public_html/Donation/test.php:10) in /home/rgajsgjb/public_html/Donation/test.php on line
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #13  
Old 03-26-2008, 08:11 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 9,024
Default Re: database Queries with PHP

http://www.tizag.com/phpT/phpsessions.php

You have pasted the session_start() code somewhere in the middle of the page instead of the very start as i suggested.
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #14  
Old 03-31-2008, 12:57 AM
kadm's Avatar
Corporal
 
Join Date: Mar 2008
Location: Vryheid South Africa
Posts: 14
Send a message via Skype™ to kadm
Default Re: database Queries with PHP

Need help with my php files that do not want to work on my site, the were working the day befor yesterday and have submitted a ticket, with no reply as yet. The problem is with contact and guest forms, can you help please.
site http://www.aaasuredealinternational.net
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #15  
Old 03-31-2008, 06:55 AM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 9,024
Default Re: database Queries with PHP

Your contact form seems working, i can't know more details because the php file is not visible. Guest forms ? i tried the guestbook, if that is what you mean, and it works ok. If you meant another form, i didn't find it.
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT +1. The time now is 11:24 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC7
2007 VodaHost.com - All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54