Jump to content

pouncer

Members
  • Posts

    324
  • Joined

  • Last visited

    Never

Everything posted by pouncer

  1. an SQL is one way which i can store my information in the database. can someone please give me a list of more?
  2. im making a profile sectio for members, so on their profile they can upload pictures of themselves. but i want it to be a thumbnail/small image on their profile. and when people click on it, it enlarges
  3. what does basename do? and 0777 in that line
  4. roopert and chris, excellent replies. Thanks guys.
  5. [code=php:0] <?php $file_dir = "c:/domains/site.com/wwwroot/myftpname"; foreach($_FILES as $file_name => $file_array) { echo "path: " . $file_array['tmp_name'] . "<br>\n"; echo "name: " . $file_array['name'] . "<br>\n"; echo "size: " . $file_array['type'] . "<br>\n"; echo "type: " . $file_array['size'] . "<br>\n"; if (is_uploaded_file($file_array['tmp_name'])) { move_uploaded_file($file_array['tmp_name'], "$file_dir/$file_array[name]") or die("Couldnt copy"); echo "file was moved<br><br>"; } } ?> [/code] It works ok. But how can i upload the file to a folder named by $_SESSION['Username'] and if that folder doesnt exist, would it auto-create the folder? and when the file is uploaded successfully, i should also add entries to a sql table right? to store the filename,link etc etc. this would be easier to loop through the usernames folder and display all their images right?
  6. thanks but how can i make it return the greeting in php. because i use like $log->GetGreeting(); its a function in my class
  7. how can i convert this php function to java scrpt [code=php:0] function GetGreeting() { if (date("H") < 12) return "Good morning!"; elseif (date("H") < 16) return "Good afternoon!"; else return "Good evening!";  } [/code] it displays the greeting depending on the time on the server as php is server-side. i want to fix it to display greeting depending on the time on the users machine - javascript. any help please?
  8. in myftp folder all the folder/files are in 'myftp'
  9. template_banner.html is in the 'includes' folder
  10. i have this line in my forum.php [code=php:0] include '../includes/template_banner.html'; [/code] (NOTE: forum.php is in the forum folder so to view its like like www.domain.com/myftp/forum/forum.php) template_banner.html is simply this [code=php:0] <div align="center" class="style6">         <div align="left"><span class="style14">           <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="780" height="192">             <param name="movie" value="flash.swf">             <param name="quality" value="high">             <embed src="flash.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="780" height="192"></embed>           </object>         </span></div>       </div> [/code] but it just doesnt put that flash banner on the forum.php for some reason. All I see is a white space. Works on other pages though which are outside the 'forum' folder
  11. how can i disable a text field. im using dreamweaver, cant see any option to do it
  12. damn. nothing seems to work. i tried all your sugestions :s
  13. nope, still the same error :s This is the exact code ive got at the top of addtopic.php [code=php:0] <?php session_start(); require_once("../php_classes/class_login.php"); $log = new Login(); ?> [/code]
  14. i have a folder called php_classes with a class_db.php in it. i created a folder called forum. Inside forum i put addtopic.php inside addtopic.php i put [code=php:0] require_once("php_classes/class_db.php"); [/code] which is throwing me an error Warning: main(php_classes/class_login.php) [function.main]: failed to open stream: No such file or directory in c:\domains\bn.nl\wwwroot\myftp\forum\addtopic.php on line 4 line4 is the require line, whats the problem it works when i put the addtopic.php outside of the forum folder, but not when it is inside the folder.
  15. thanks!! but when i do include 'whatever' do i have to have that within php? <?php include 'whatever' ?> ?
  16. i have a footer at the bottom of my page, but instead of ust having it on very one of my pages i would ust rather put in include 'whateverfile.html' and in that file would be the code for the footer. this way, when i need to make changes to the footer, i just edit the whateverfile.html is this possible?
  17. set something up with them? huh? i don't want to set anything up with them. just asking about grabbing certain info off a site
  18. What I want to do is let a user type in a search criteria in an edit box. e.g, stamps, coins or whatever then i want to somehow connect to ebay and grab all prices of stamps on ebay, and their inormation and parse the data and display it on my own website. anyone got any suggesstions ?
  19. [quote author=haaglin link=topic=114451.msg465648#msg465648 date=1163112086] u can use: [code]die("You need to be logged in to access the member area.");[/code] Or you can use session variables. [/quote] Thanks. and yeah, the $log->IsLoggedIn() basically checks if there's a $_SESSION['UserID']; hm, i ust tried it, it just echos that line at the top. is there a way to actually prompt a msgbox on the screen?
  20. Sorry, generic, did you not understand what I asked? (worrying)
  21. [code=php:0] if (!$log->IsLoggedIn()) { //i want to msgbox here. You need to be logged in to access the member area. header('Location: index.php'); } [/code]
  22. If it's not your server, you'll have to contact the server webmasters. Just send them an email describing your problem. It seems like they have only congigured the SMTP for their own server so you can only send emails to *@<thehostsdomain>.com
  23. i just want to set my username/password as some jubled up characters so no-one can get my password that easily..
  24. hmm problem. if my username is 'eric' str_rot13("eric") gives me revp i cant get back to 'eric' from revp
×
×
  • 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.