Jump to content

t.bo

Members
  • Posts

    57
  • Joined

  • Last visited

    Never

Everything posted by t.bo

  1. Damn it didn't work. The variables stay empty I think. This is the table : CREATE TABLE `yourtable` (   `idfield` int(11) NOT NULL auto_increment,   `titlefield` varchar(250) NOT NULL,   `content` text NOT NULL,   PRIMARY KEY  (`idfield`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; The table already has inputs... This is the php : Page with the links : [code]<? include('dbconnect.php'); $sql = mysql_query("SELECT * FROM `yourtable'"); while($row = mysql_fetch_assoc($sql)) { $title = $row['titlefield']; $id = $row['idfield']; echo "<a href='page.php?id=$id'>$title</a>"; } ?> [/code] Page.php  : [code] <? include('dbconnect.php'); $id = $_GET[id]; $sql = mysql_query("SELECT * FROM `yourtable` WHERE and `idfield`='$id'"); $content = $_GET[content]; echo "$content"; ?> [/code] I probably made a mistake with page.php but the page with the links should work a,d it does not... Dbconnect is correct though
  2. Yes exactly , so its just giving problems for a correct output...
  3. Damn, its still kinda hard for me... If I grab the info like u said. Put it in the variables...ok But then I dont know how I can make the link work <a href="?id=$id>link to treatment<a> when I click the link the content should be $content. How can i do that?
  4. Thank u for the reply!! Im one step further now. But I have problem with making the correct links, it should be something like this <a href="index.php?content=treatment&id="$id"> That should make a link but how can I display the content that matches the id when the link is clicked?
  5. Well im makeing this site [url=http://www.euroclinix.com]http://www.euroclinix.com[/url] When you go to "behandelingen" (wich means treatments) you see all the possible links to treatments above. (botox, ...) But now I want to make it possible to make new treatments with their new page and display the new link next to the other treatments. Hope this helps cuz I really need this one. greetz
  6. Hello everybody, I'm a noob with PHP but slowly im workin my way around. I have a problem though. I need to have a form where you can create a new link on a page that links to another page with text that you also have to input in the form. I also need a delete function. I cant find it on the internet and tutorials are not helping me. Can anyone help me out, guide me trhough the process or send me to a good URL with a bit of the code? Thanks in advance T.bo
×
×
  • 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.