Jump to content

rahul.pache

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

rahul.pache's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I dont want to use get or session or cookie... I just want to send POST data as header to a page. I want to redirect to a page which is not in my server but I want to send data as well.
  2. How can I send data to a website using curl...
  3. Hello !!! Happy new year (this is my fst post after new year 2009) When I tried to redirect my page to a new location I came to know that no POST data is sent while redirecting. So my question is: While redirecting a page to a new location using header("Location: newpage.php"); I want to send POST Data. Is there any method to do it ? Have a nice day !!!
  4. Thanx dude !!! When I searched on php.net about the function I found this does not work if id is BIGINT for that case we have to use LAST_INSERT_ID() function Thanx alot ...
  5. I am using php and mysql I want to insert some data in database. Database is id (primary key, auto increment) | email address | password I insert data like $query1 = "insert into DatabaseName values(NULL, 'Tony@tony.com', 'Tony ...... ')"; then execute the query BUT I want to retrieve the ID which has been just set for inserted data. Please suggest me the optimal solution..... (I don't want to search again for the data inserted and get its id.) Is there any direct solution for doing this Plz help I will be thankfull.
  6. Hello Everybody!!! I want to automate some paypal process. I am writing code in PHP. BUT dont know anything about Paypal. And I cant understand their Documentation... Its all Greek Language for me. What I know till now is adding pay now button. And adding add to cart button. But I am trying this. I have made a manual cart of my own.... What i want to do is simple >>> I have a list of products in array. And on click of "checkout" I want to redirect visitor to PAYPAL Cart or Paying Page... along with the products and ovoiusly their prices. Please someone suggest me the procedure... I will be very very thankfulll,,,
  7. I want to make a website which display the price in the currency of the country it is being accessed from. Is there any way to get the current exchange rate in the web ? How can i know country from an IP address ? Thanks !!!
  8. --- EDIT 1 --- Here is the situation I have a database >> table I want to display those entries in a page I already have made a class and want to make a function to read data from database. I want to load those data in the member variables in the class when the function is called. But I cant understand one thing. The class(object created) will hold only one row from database. Here is the problem What if i want to show all the data. I can use only functions inside the class coz i want to make it object oriented design. For this i will have to read all rows and create an array of objects. But I dont know how to implement it using a function which itself is inside same class. Or Is there any way to create a next() function to load next row into the object. Like $myObj->next(); will load values from next row into the object. Here is the class structure class A { private $x; private $y; private $z; function __construct() { $x=NULL; $y=NULL; $z=NULL; } public function getDataFromDB() { // connect to database // Get a row from database and store it to x,y,z $this->x = row['x']; $this->y = row['y']; $this->z = row['z']; } public function retX() { return $this->x; } public function retY() { return $this->y; } public function retZ() { return $this->z; } public function displayData() { echo $x.$y.$z; } } $myA = new A(); $myA->getDataFromDB(); /// This will read all the rows but load only one row. $myA->displayData(); /// This will display 1st row coz only fst row is loaded into $myA /// To solve the problem I need an array of objects. Like $myA[]; /// But I cant understand how to load 1st row in $myA[0] and 2nd row in $myA[1] and sooo on. /// ANother way to solve this problem is to make some $myA->next(); function // Which will load the next row into $myA; Please suggest me a solution I will be thankful.
  9. After ur dynamic site is created. Let your static pages remain same. Just clear its content and add a redirect PHP script to redirect it to pages's current location. Like Product1Page [Old page] => products.php?q=pro1 [new page] Here is the old page --------------------------------------------------------- /// Remove all its content // and add <?php header("Location :products.php?q=pro1"); ?> ---------------------------------------------------------
  10. Here is the situation I have a database >> table I want to display those entries in a page I already have made a class and want to make a function to read data from database. I want to load those data in the member variables in the class when the function is called. But I cant understand one thing. The class(object created) will hold only one row from database. Here is the problem What if i want to show all the data. I can use only functions inside the class coz i want to make it object oriented design. For this i will have to read all rows and create an array of objects. But I dont know how to implement it using a function which itself is inside same class. Or Is there any way to create a next() function to load next row into the object. Like $myObj->next(); will load values from next row into the object. Please suggest me a solution I will be thankful.
  11. YES its working. Thanx BUT is it correct to use global variables ? Coz i have heard somewhere not to use global variables. And I dont know why ?
  12. I am using XAMPP {PHP 5} Here is the code : <?php $var=0; function test() { echo "<br> VAr : " . $var; $var = 1; echo "<br> VAr : " . $var; } test(); if($var == 1) { echo "Hello"; } ?> I have taken 1 variable $var = 0; outside the function And I want to use it inside the function. So that after changing its value it will be available to print "hello" Plz suggest how to do that. I WILL BE VERY VERY THANKFULLLLLLL
×
×
  • 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.