Zoud Posted January 15, 2007 Share Posted January 15, 2007 [code]<?php require("includes/layout_top.php"); ?><?php $con = mysql_connect("-","-","-") or die('Error: <br />'. mysql_error());if (!$con) die("Error: ". mysql_error());mysql_select_db("members", $con) or die("Error: ".mysql_error());if (isset($_GET['id'])){ $id = $_GET['id']; $sql = "SELECT * FROM `profile` WHERE `id`='$id'"; $result = mysql_query($sql) or die("Error: ".mysql_error()); $num = mysql_num_rows($result); if($num == 0) echo "There are no users that posses the id ".$id; else { for($i=0; $i < $num; $i++) { $user = mysql_result($result,$i,"username"); $date = mysql_result($result,$i,"date"); $email = mysql_result($result,$i,"email"); $pro = mysql_result($result,$i,"profile"); } }}if (!isset($_GET['id'])){ echo "DISABLED"; echo "<div style=display:none;>";}?>Username: <?php echo $user ?><br>Email: <?php echo $email ?><br>Date Joined: <?php echo $date ?><br>Profile: <?php echo $pro ?><br><?phpif (!isset($_GET['id'])){ echo "</div>";}?><?php require("includes/layout_bot.php"); ?>[/code]Here's what I'm trying to accomplish. When viewing the page under no extention (not having ?id=) I want it to show only the echo "DISABLED" without any of the profile content. Now, I've got part of that down, but I'm using the <div style="display:none;"></div> tag.How could I make it not show the profile content using using only PHP so that when viewing the source, you can't see anything but DISABLED. Link to comment https://forums.phpfreaks.com/topic/34321-one-page-multi-tasker/ Share on other sites More sharing options...
Zoud Posted January 15, 2007 Author Share Posted January 15, 2007 :'( Anyone? Link to comment https://forums.phpfreaks.com/topic/34321-one-page-multi-tasker/#findComment-161467 Share on other sites More sharing options...
Zoud Posted January 15, 2007 Author Share Posted January 15, 2007 I uhh... I don't know if bumps are allowed so... I'll try it now and if I get in trouble then I wont do it again. :-X Link to comment https://forums.phpfreaks.com/topic/34321-one-page-multi-tasker/#findComment-161546 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.