User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 374,163 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,248 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 393 | Replies: 13 | Solved
Reply
Join Date: Apr 2008
Posts: 31
Reputation: shadiadiph is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
shadiadiph shadiadiph is offline Offline
Light Poster

Re: post submitting values not working?

  #11  
May 19th, 2008
almost there only problem is it displays like this???


Array ( [0] => 7 [intnewsID] => 7 [1] => [intAccountID] => [2] => Ecuador offers to buy out oil companies [newsshTit] => Ecuador offers to buy out oil companies [3] => Ecuador offers to buy out oil companies [newsTit] => Ecuador offers to buy out oil companies [4] => Sat May 17, 7:32 PM ET 
President Rafael Correa says Ecuador wants to buy out private oil companies unwilling to negotiate new deals with his government.
Correa has asked companies now suing over an October decree that slashed their share of windfall oil profits to 1 percent to drop their lawsuits.
Ecuador on Friday offered to boost those companies' share of soaring windfall profits to 30 percent. If companies aren't happy with that offer, Correa says his government will buy their assets at "a fair price."
France's Perenco Gabon SA, U.S.-based Murphy Oil Corporation and ConocoPhillips-subsidiary Burlington Resources are among those to file claims against Ecuador.
Windfall profits are unexpected earnings on oil sold for more than the price fixed in a company's contract.
[newsMn] => Sat May 17, 7:32 PM ET 
President Rafael Correa says Ecuador wants to buy out private oil companies unwilling to negotiate new deals with his government.
Correa has asked companies now suing over an October decree that slashed their share of windfall oil profits to 1 percent to drop their lawsuits.
Ecuador on Friday offered to boost those companies' share of soaring windfall profits to 30 percent. If companies aren't happy with that offer, Correa says his government will buy their assets at "a fair price."
France's Perenco Gabon SA, U.S.-based Murphy Oil Corporation and ConocoPhillips-subsidiary Burlington Resources are among those to file claims against Ecuador.
Windfall profits are unexpected earnings on oil sold for more than the price fixed in a company's contract.
[5] => 2008-05-18 [dtAddedOn] => 2008-05-18 ) 
Reply With Quote  
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,042
Reputation: nav33n has a spectacular aura about nav33n has a spectacular aura about 
Rep Power: 8
Solved Threads: 227
nav33n's Avatar
nav33n nav33n is online now Online
Posting Sensei

Re: post submitting values not working?

  #12  
May 19th, 2008
Yes. It displays everything it fetches for that particular id. You can limit your output by choosing what to print. As you can see, $row is an array. $row['intnewsID'] will have 7, $row['newsTit'] will have "Ecuador offers to buy out oil companies" and so on.. Check this out.
http://nl3.php.net/mysql_fetch_array
This is how you can print only newsTit value.
  1. //news.php
  2. //db connection
  3. $id = mysql_real_escape_string($_GET['id']);
  4. $query = "select * from newstable where id = '$id'";
  5. $result = mysql_query($query);
  6. $row = mysql_fetch_array($result);
  7. print $row['newsTit'];
  8. ?>
Last edited by nav33n : May 19th, 2008 at 10:20 am.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

*PM asking for help will be ignored*
Reply With Quote  
Join Date: Apr 2008
Posts: 31
Reputation: shadiadiph is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
shadiadiph shadiadiph is offline Offline
Light Poster

Re: post submitting values not working?

  #13  
May 19th, 2008
cheers awsome thanx 4 the assistace
Reply With Quote  
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,042
Reputation: nav33n has a spectacular aura about nav33n has a spectacular aura about 
Rep Power: 8
Solved Threads: 227
nav33n's Avatar
nav33n nav33n is online now Online
Posting Sensei

Re: post submitting values not working?

  #14  
May 19th, 2008
You are welcome
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

*PM asking for help will be ignored*
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

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

 

DaniWeb PHP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 3:57 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC