Current location: Hot Scripts Forums » Programming Languages » PHP » Help with mysql/php codes


Help with mysql/php codes

Reply
  #1 (permalink)  
Old 10-16-09, 09:26 PM
ghdsupport ghdsupport is offline
New Member
 
Join Date: Oct 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Help with mysql/php codes

im a newbie to coding and I paid someone to create my website for me....

He has:

Code:
require ('../connect.php');
echo "<link href=\"http://assets3.twitter.com/static/1247099472/twitter.css\" media=\"screen, projection\" rel=\"stylesheet\" type=\"text/css\" />";
        $pwd = mysql_real_escape_string($_GET['pwd']);
	$result = mysql_query("SELECT * FROM songs WHERE pwd='$pwd'");
	$mp3 = mysql_fetch_array($result);
	$songname = $mp3['mp3'];
	$downloadallowed=$mp3['download'];
	mysql_query("update `songs` set `viewed`=`viewed`+1 WHERE pwd='$pwd'");
	if($downloadallowed==1)
so I tried to edit this into it:

Code:
require ('../connect.php');
echo "<link href=\"http://assets3.twitter.com/static/1247099472/twitter.css\" media=\"screen, projection\" rel=\"stylesheet\" type=\"text/css\" />";
        $pwd = mysql_real_escape_string($_GET['pwd']);
	$result = mysql_query("SELECT * FROM songs WHERE pwd='$pwd'");
	$mp3 = mysql_fetch_array($result);
	$songname = $mp3['mp3'];
        $songtitle = $song['song'];
	$downloadallowed=$mp3['download'];
	mysql_query("update `songs` set `viewed`=`viewed`+1 WHERE pwd='$pwd'");
	if($downloadallowed==1)
after I edited the code I tried to add the $songtitle it in a link that he had on the php page:
but when I clicked it $songtitle didn't work, only the $mp3 worked.

Code:
<a href=\"http://twitter.com/home/?status=RT: TEST+$mp3+$songtitle+www.xxxxxx.com/$pwd\" target=\"_blank\">
does anyone know how to fix this? why wont the $songtitle work? I tried to create a new "echo" but that just gave me errors so I switched it back...
Reply With Quote
  #2 (permalink)  
Old 10-16-09, 10:42 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,515
Thanks: 20
Thanked 109 Times in 106 Posts
PHP Code:

 $songtitle $mp3['song']; 

Reply With Quote
  #3 (permalink)  
Old 10-17-09, 12:46 AM
ghdsupport ghdsupport is offline
New Member
 
Join Date: Oct 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks! Worked perfect, im just getting to learn this mysql/php and its pretty hard at first...
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Managing quality of codes wheimeng PHP 6 04-03-08 02:16 PM
Encrypting ASP codes e-XPLoDeR ASP 2 02-26-07 09:30 AM
Are Blogs Compatible With Different Codes? Mephistopheles The Lounge 1 04-01-06 08:42 AM
My codes work for me but not my users please help! maryann PHP 12 03-21-05 08:41 AM


All times are GMT -5. The time now is 08:01 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.