Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Welcome to the world of dynamic web design,</p> <p>Assuming you don't want to look into a CMS:</p> <p>Essentially you are going to create a webpage but instead of content, you will have php tags that most likely request and echo database content, the content is usually determined by a get variable (in Facebook's case that variable is the user id).</p> <p>More specifically you would use a more complex version of the following code at the top of your page:</p> <pre><code>&lt;?php $givenId = $_GET["uid"]; //or whatever your get variable is if(ctype_digit($givenId)){ //or whatever validation you want to use to prevent sql injection $givenId = intval($givenId); mysql_connect("localhost", "USERNAME", "PASSWORD"); mysql_select_db("YOUR_DB"); $oisthere = mysql_query("SELECT * FROM TABLE WHERE id=$givenId"); mysql_close(); if(mysql_num_rows($oisthere)!=0){ $sqlholder = mysql_fetch_row($oisthere); } else{ //return error } } ?&gt; </code></pre> <p>Then in your page you could have references to <code>&lt;?php echo($sqlholder[1]); ?&gt;</code>, where the fist column holds their username or status or other important data.</p> <p>However the fact that you're asking the question tells me that you don't know much about php, mysql, and dynamic webdesign in general. Because of that I'm going to recommend you don't start building your site until you have read up and mastered the concepts. As a starting place I suggest: <a href="http://www.w3schools.com/php/default.asp" rel="nofollow" title="W3schools page on php">w3schools</a>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload