Jump to content

[SOLVED] Problem writing URL into database


ThunderLee

Recommended Posts

How would I write this into the database?

 

<?php echo "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; ?>

 

I tried this:

 

$url = "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']

$ucheck = mysql_query("SELECT * FROM `shortcuts` WHERE `uid`='".$_SESSION['user_id']."' AND `url`='".$url."'") or die(mysql_error());

 

Everytime I keep getting errors!

 

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\inetpub\vhosts\mymediaupload.com\httpdocs\media.php on line 279

 

This is the error I get and it points to a part of my file which I didn't edit, if I remove the above the page works fine??

Thanks for the fast responce,

 

I still get this:

 

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\inetpub\vhosts\mymediaupload.com\httpdocs\media.php on line 279

 

This is whats around that line..

 

			<tr>
			<td height="0" width="6" background="images/LL.png" rowspan="3"> </td>
			<td height="29" width="97" bgcolor="#FFFFFF" valign="top">
			<p align="center">
			<img src="<?php echo "".$c['display_picture'].""; ?>" height="90" width="90" align="center"></td>
			<!-- LINE 279 --><td height="29" width="138" bgcolor="#FFFFFF" valign="top">
			<div id="content"><b><?php echo "".$c['display_name'].""; ?></b><br>

			<?php 

			echo date("D d M Y",strtotime($m['dateadded'])); ?><br><br><b>Views:</b> <?php echo "".$m['views'].""; ?><br><b>Rating:</b> <?php echo "".$m['rating'].""; ?><br><b>Media:</b> Music</div></td>
			<td height="0 width="6" background="images/RR.png" rowspan="3"> </td>
		</tr>

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.