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']; ?>

Did you know?Explore Trending and Topic pages for more stories like this.
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

IP Based Cron Jobs
I run cronjobs on my website. After one of my visitors got curious and tinkered around he realized h

Apart from cron
I need to run a php file every one hour. Is there any other solution apart from cron job?

multipart emiail forms
Hi All,

I am new to the boards and I've been working on a form (which is rather massive, imo

Typedef struct vs just struct
Anyone know the rationale for using typedef for structs when a struct is itself a typedef? I have s

Problem in OnClientClick and OnClick sync
Hi,Strange and irritating problem: I have below button declaration in markup of the aspx page:

image upload script not working with png
The basic process of this php code is to take the submitted file, convert it to a small JPG thumbnai

Multidimensional $_POST
Hello

How to get a single array from array of array (2 - dimension).
For example I have a

header redirect problems? please help
Ok i am making a site that generates youtube thumbnails and i am generating an image that displays 1

MS Exchange 2007 integration with ECC 6.0
Hello Experts,
We have ECC 6.0 and MS Exchange 2007. We need to integrate ECC 6 and MS Excha

This must be easy , pulling the last record of the day, every day, from a txt
I have a txt file logging weather data every minutes (so 1 record per minute). I want to extract the

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