Jump to content

nikkieijpen

Members
  • Posts

    31
  • Joined

  • Last visited

    Never

Everything posted by nikkieijpen

  1. Use the GET method Link your search result to your details page by passing the ID in de URL. The details page extracts the id from the URL and executes a mysql_query which gets the row which had that particular id. Search results page: <a href="details.php?id=<?= $row_seach_result['id'] ?>"><?= $row_seach_result['title'] ?></a> And your details page: if(isset($_GET['id'])) { $id = $_GET['id']; $result=mysql_query("SELECT * FROM table WHERE id='$id'"); $row_result=mysql_fetch_assoc($result); }
  2. set your 4 between single quotes: $query = "SELECT * FROM Products WHERE Category_id = '4'";
  3. $a->$b -> is a pointer to variable $b in class $a
  4. Why don't you use a main 'class'? include('myClass1.php') // which contains MyClass1; include('myClass2.php') // which contains MyClass2; $myClass1 = new myClass1(); $myClass2 = new myClass2(); $taxRate = myClass1->$taxRate; $newVar = myClass2->$var2; This way use can your variables and functions of both classes together.
  5. do you have your Apache Server running? And are you running your scripts from the localhost?
  6. $user=mysql_fetch_array($user3); has to be $user=mysql_fetch_array($user2); ??
×
×
  • 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.