Jump to content

CSmith1128

Members
  • Posts

    46
  • Joined

  • Last visited

    Never

Everything posted by CSmith1128

  1. Thanks for the reply.. I actually tried that before I posted my question and the white dots weren't there. You said I could make certain colors transparent in the image.. Which function would I use to set those colors? Thanks
  2. Hello. I was wondering if there is any way to remove the white pixels from around a transparent png image? When I use imageimagecopymerge to place a transparent PNG on top of another image with a dark background, the top image has a few white pixels around the border. Is there any way to remove these white pixels? I attached an example of the image with the white pixels. Thanks [attachment deleted by admin]
  3. Can I 'order by' using the date and time from every table? I know I can select data from multiple tables, but can can i order them all?
  4. Hey.. I need some help.. I have a database with a few tables in it. 1 table is for images, another table is for comments, another table is for friends, and another table is for announcements. The friends table has a unique_id, friend_id and user_id. Every other table has a unique_id, user_id, add_date, and add_time. I need to go through the friends list table, and for every entry in the table that contains a certain user_id, I need to get the most recent entries from the other tables that contain the friend_id associated with the user_id in the friends table. So, for all my friends, I want to display the most recently uploaded images, comments, and announcements. I don't want to show the most recent from EVERY user, just the top 50 recent entries. So the top 50 out of everyone. I want a total of the 50 most recent entries so I can display them on a users home page. I have no idea how I would get started with this. I'm using php, and I was thinking about putting them all in an array and then sort them all by the date and time, but I dont think it would be very efficient. Can anyone help me get started or show me where to look for some ideas? Thanks
  5. thanks! i changed http://www.thissite.com/global/php/global_php.php to ./global/php/global_php.php and everything works now! Thank you!
  6. Hello. I need some help including files. When I try to include a file, the variables are not passed between files.. Here is my code... $this_variable = "ok"; require_once("http://www.thissite.com/global/php/global_php.php"); Inside the global_php.php file, I have the following code... echo $this_variable; when I load the page, nothing is printed. "ok" should be printed but it is not. I also tried require, include_once, and include, and they all do the same thing.. Is there something I am missing? Usually this isn't a problem for me. Thanks, Chris
  7. Hey... I have a site that allows users to upload a short mp3 file to a folder on my site. The file gets uploaded, stored in the folder, and information is entered into a database. I was wondering if it is possible to find out the length of the mp3 file so I can store it in the database? Is it possible? Thanks! Chris
  8. Hello.. I have a site where I want to allow users to upload music files that they have so other users can listen to them on my site. I was wondering if there is any way to compress the files to save space? I want the user to upload their file and I'll have it run through a script or something to compress it before it is actually saved on the server. I am making a flash media player that the users will use to play the music, but I am just worried about the amount of space on the server, upload times, and streaming times and I'm sure compressed files will help. Is it possible? Also, would it be best to store the files in the database, or would it be better to store them in a folder with details in a database that points to its location? Thanks!
  9. yes. perfect.. thats what I was looking for.. THANKS!
  10. oops.. forgot a part... $this_time = $this_time_hour . ":" . $this_time_minute . ":" . "00"; add that below.
  11. if($this_time_ampm == "PM") { if($this_time_hour != 12) { $this_time_hour = $this_time_hour + 12; } } else { if($this_time_hour == 12) { $this_time_hour = "00"; } } how does that look?
  12. And I dont have to worry about converting it? I have a form where a visitor can enter a time. There's an hour, minute, and am/pm drop down selector so they can choose the time. So I get the hour, minute, and am/pm separately. The format I get it in isn't in the timestamp format. The mysql field is in the TIME format. So I have to convert the hour, minute, and am/pm to whatever format CURTIME() is in. (sorry, I said CURDATE in my first post) Is there a function to do that?
  13. Yea I looked at the date function. Can I tell it 1:11 PM and have it converted to a timestamp? How would I do that. I already have the time, I just need it converted.
  14. Hello.. I have a pretty simple question probably.. but for some reason I cannot think right now and cannot figure it out... I need to convert this: 1:11 PM to the mysql date format. So the format that CURDATE() is in i need it converted to. First, what format is CURDATE() in? Just for reference. And second, how would I convert it? I am given the hour from 1 to 12, minutes, and AM or PM. Thanks! -Chris
  15. ahh yes... how dumb of me.. i didn't set the permission to access both databases, i only had it set up to access the one
  16. $dbcnx = mysql_connect("localhost",$mysql_username,$mysql_password) or die("Unable to Connect to the Server at This Time... Please Try Again Later.");
  17. $mysql_database="this_db"; $mysql_username="user"; $mysql_password="password"; $dbcnx = mysql_connect("localhost",$mysql_username,$mysql_password) or die("Unable to Connect to the Server at This Time... Please Try Again Later."); mysql_select_db($mysql_database, $dbcnx) or die ("Unable to Connect to the Server at This Time... Please Try Again Later.");
  18. okkkkk.. now i have a connection problem i believe.. when i try to access the information from both databases, this is the error i receive... SELECT command denied to user 'this_user'@'localhost' for table 'userTable'.. do you know why this is? thanks!
  19. oh ok good.. i was thinking thats what it meant but i was not completely sure.. thanks!
  20. what is the 'a' and 'b' in there for? what do they represent? im not as familiar with JOINS as i should be and i am confused right there.. thanks!
  21. Hello. I am using multiple databases on my site. I was wondering if it were possible to select something from a database based on information from another database.. for example.. i want to select the user_id of a user where their age (found in database 1) is 28 and the gender of that person (found in database 2) is male. is this possible? i am trying to do it in 1 query, if thats possible.. if not, thats fine.. whatever works and is most efficient. thanks!!
  22. Hello.. I need some help. I want to let users upload videos to my site so other users can view them. Is there any safe way to do this? Or are there any type of "tools" to verify whether or not the file is really a video? Security is my main priority and I do not want to be vulnerable, so if anyone has any tutorials or tips, please let me know. Thanks! Chris
×
×
  • 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.