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

help with php
It's not displaying or pulling anything out of the database.


Code: <html><

strptime() equivalent for php4 ?!
Greetings!

this is my first post, thank you in advance for your replies.

Well, the ti

want a code for uploading and downloading
i m trying to upload and download to my site..i need upload and download code ...i use a code for up

How can i use [] tags instead of <> tags for profiles??
On my site im making ive made it so u can register, login and u have a profile which u can update..<

Async WSAConnect failed on XP with error code = 2 ("File not found")
Hi all,

I have very strange bug, please help me if you can.

It is reproduced o

Prevent PHP mail( ) from appending hostname to from address
Hey guys,

I want to be able to send texts to phones via email (since each phone has their own

Functions Not Loading Into Div
I had some help doing some of this but what I'm trying to do is get my functions to retrieve its val

uploading video files into mysql in php
hi,
I have the video files which i have to upload into mysql db. along with creating thumbnails f

cURL Upload Help
OK, I am creating a bridge from a local program to my website and I am trying to find the best way t

getting weird error..
okay, I'm getting an error on this particular function, something about the syntax in the mysql LIMI

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