Problem writing URL into database


Posted on 16th Feb 2014 07:03 pm by admin

How would I write this into the database?

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

I tried this:

Code: $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!

Code: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:inetpubvhostsmymediaupload.comhttpdocsmedia.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?

No comments posted yet

Your Answer:

Login to answer
247 Like 17 Dislike
Previous forums Next forums
Other forums

upload photo limits
ive got a upload photo script and im just trying to make more secure currently it limits size and as

INSERT for date range
Hi all

I have the following table

Code: [Select] `date` date
`day` int(2)
`

Stumped by Third Day of Month problem
I am trying to build an algorithm that will essentially do this:
Code: [Select]$this_month = Oct

Recording popularity by day, week.. all time?
Hey everyone, I'm creating a site designed around users uploading music. How can I implement a syste

extract a file from zip file
hi,
i know how to unzip a zip file in php, but is there a way to just extract a certain file only

How to submit a form to the same page?
I have a table containing information about books in my library and this table has the following col

Display Database
I need to create a shopping cart. I found this code online: http://conceptlogic.com/jcart/
Unfort

upload image name with extension using php
hi frds..

<input id="file1" type="file" name="file[]" &a

Specific name typed, specific image shown on html page
Hello,

Fairly new to PHP and was curious if someone might know how to solve a fairly simple r

Sub-domains & calling unique content
Hello,

Is there a way use something similar to the $_GET function for a sub-domain? I to be a

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash