Jump to content

BlueM

Members
  • Posts

    17
  • Joined

  • Last visited

BlueM's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I understand the security risks but the script is somewhat protected. That kind of data can not be stored in the database
  2. This is the original output for the php code [ {"id":"1","name":"Rae Sremmurd"}, {"id":"2","name":"Tyga"}, {"id":"3","name":"Luke Christopher"}, {"id":"4","name":"Tink"}, {"id":"5","name":"Lil Herb"}, {"id":"6","name":"Lil Durk"}, {"id":"7","name":"Mac Miller"}, {"id":"8","name":"Kidd Kidd"}, {"id":"9","name":"Sage The Gemini"}, {"id":"10","name":"Blac Youngsta"}, {"id":"11","name":"John River"}, {"id":"12","name":"Migos"}, {"id":"13","name":"Danny Seth"}, {"id":"14","name":"Soulja Boy"}, {"id":"15","name":"Dave East"}, {"id":"16","name":"King Los"}, {"id":"17","name":"Wiz Khalifa"}, {"id":"18","name":"Lil Bibby"}, ]
  3. not sure if I am using it right but now its escaping all the special characters but i need them in order to have the script run correctly.
  4. Thanks for your input benanamen but i'm looking for a solution for the while loop not a solution for connecting to and pulling the data from the database. The script works without the last comma being echoed out.
  5. I have a php script that generates a javascript code. [ <?php $conn=@mysql_connect("localhost","root",""); $select=mysql_select_db("dripp",$conn); $lalala=mysql_query("SELECT * FROM typo"); while ($display=mysql_fetch_assoc($lalala)){ $one='{"id":"'; $display['id']; $two='","name":"'; $display['name']; $three='"},'; echo $all=$one.$display['id'].$two.$display['name'].$three; ?> <?php } ?> ] The problem with this code is that it in the output the final comma is messing with the script. I've searched everywhere for a solution but I can not find a way to remove the last comma without removing them all. Please help
  6. Hey guys, I am looking for someone who can design an audio player that can also play a playlist for a website. The player I am looking for needs certain details. 1) Needs to hide src of file 2) Needs to have controls including attractive progress bar 3) Needs to read from mysql database. I am a bit of a programmer myself so I will be tweaking it but the skeleton must be there. Obviously willing to pay for your time please contact back.
  7. Hey guys this is pretty simple i guess but i need some help. I am trying to output both information from the arrays but without doing the loop twice. this is my output: applefruit appleveggie appletree carrotfruit carrotveggie carrottree pinefruit pineveggie pinetree but I would like to have an output like : applefruit carrotveggie pinetree here is my code <?php $first="apple,carrot,pine"; $second="fruit,veggie,tree"; $array1=explode(",", $first); $array2=explode(",", $second); foreach($array1 as $number1) { foreach($array2 as $number2) { echo $number1.$number2."</br>"; }} ?>
  8. I got it to work with an update query instead. I should be doing that because I need to append to the data that is already there. Thanks for the printf tip
  9. When I run ip_add($user_ip); this is the output.... THE QUERY IS 'INSERT INTO media(ip) VALUES ('::1') WHERE id=51' im so lost, I dont know why it wont run
  10. $user_ip =$_SERVER['REMOTE_ADDR']; ip_add($user_ip); and $realid is a number that corresponds to the id collum in my table $url=$_SERVER['REQUEST_URI']; $realid=trim(strstr($url, '.'),'.'); and yeah i clicked on the link but i still dont understand... if (!mysqli_query($query_run, "SET ip=1")) { printf("Errormessage: %s\n", mysqli_error($query_run)); } that gives me a bunch of errors.
  11. $i is just supposed to be a placeholder for when i actually run the function and $realid is a value taken from the url. I'm not quite sure how i would be able to use the mysqli_error() function. I'm a newb :s
  12. Hey guys, I have been trying to figure out what is wrong with my unique hit counter on my site. With a lot of trouble shooting i have figured out that the function to add the ip to the table is not working. Can anyone help me out? function ip_add($i){ global $con; global $realid; $query_run=mysqli_query($con,"INSERT INTO media(ip) VALUES ('$i') WHERE id=".$realid); }
  13. It's the space!!!! I've been stuck on this for days!! I changed RewriteRule .* -[L] to RewriteRule .* - [L] and it works fine. Thanks for your help. I've struggling so hard and i lost my password for my other account so i had to create a new one. Worth it. Thanks again
  14. I should clarify, with the .htaccess file and parse.php, everything works but I can not see the images. I does not give me a 403 but instead the image path gives me this
  15. Ok I've removed it. The .htaccess looks like this now Options -Indexes RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule .* -[L] RewriteRule ^(.*)$ parse.php And yeah the files exist in the path. If i remove the .htaccess file and the parse.php file the images appear. But with the files in place it does not display. If i try and access the file path in the browser it gives me this error.
×
×
  • 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.