Jump to content

Search the Community

Showing results for tags 'dynamicphp'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hey guys , I am currently trying to create a dynamic page layout using data that i am pulling from my database.(mysql) i have created the a href to show page.php?title=$title&id=$Id then i created the page.php where the code will be inserted to spit out the page after matching the ids this is where the problem ensues, i have created some conditionals At first, i had this code: <? $content = mysql_query("SELECT * FROM `content` ORDER BY rating, votes DESC LIMIT 0 , 30"); ?> <? if(isset($_GET['id'])){ $row = mysql_fetch_assoc($content); if (isset($row['id'])){ extract($row); } } if (!isset($_GET['movieid'])){ header("Location: i.php"); exit(); } print_r ($rows); //shows the entire array ?> but my problem that i was encountering was that any link i clicked was not producing a different ID to the URL, it was just spitting out the same array for every link i clicked on . i then tried hunting my $_GET and figured to find where the variables are coming from. and to change my SQL query to locate the correct variable i figured that the issue must be that my sql statement is not matching the $_GET to the field of the Database( 'id' ) , although that is the name of the field. i then changed it up to this simple code: $pageid = $_GET['id']; $title = $_GET['title']; $idQuery = mysql_query(" SELECT * FROM `content` WHERE 'id'=$pageid LIMIT 0 , 20"); if(isset($_GET[$id])){ $rows = mysql_fetch_assoc($idQuery); if (isset($rows['id'])){ extract($rows); } } print_r ($rows) // nothing is found i really wish to figure this out without being spoon fed the answer, but i have been stuck on this for a few nights and really could use some suggestions. thanks guys
×
×
  • 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.