Jump to content

schme16

Members
  • Posts

    97
  • Joined

  • Last visited

    Never

Everything posted by schme16

  1. I'm not asking for anything revolutionary; just what site features/attribute you've always looked for, as a personal interest.
  2. I'm really wanting to make my personal website more innovative but drew a bit of a blank; Got me thinking about what features websites either have that people loved, or features that they don't have and really should! The only 'rule' is that I don't want to hear about flash... don't get me wrong I love Flash, but it's not what I'm looking for. tl;dr So I put it to you: What features would you like to see implemented in a website. Any website.
  3. I'm too worried about the design, that's not my part in the project. just need a few people to test the features out to see if there's any vulnerabilities in it, as its an accounting software as well as the UI for customers... http://hee.sg-php.com any suggestions are welcomed Thanks to everyone who helps! ~Shane.G
  4. Any firewalls installed that could be blocking access? Also, so your details would look like this: include("Mail.php"); /* mail setup recipients, subject etc */ $recipients = "me@gmail.com"; $headers["From"] = "me@gmail.com"; $headers["To"] = "me@gmail.com"; $headers["Subject"] = "Test"; $mailmsg = "Hello, This is a test."; $smtpinfo["host"] = "localhost; $smtpinfo["port"] = "587"; $smtpinfo["auth"] = true; $smtpinfo["username"] = "me"; $smtpinfo["password"] = "****"; /* Create the mail object using the Mail::factory method */ $mail_object =& Mail::factory("smtp", $smtpinfo); /* Ok send mail */ $mail = $mail_object->send($recipients, $headers, $mailmsg); if (PEAR::isError($mail)) { echo("<p>" . $mail->getMessage() . "</p>"); } else { echo("<p>Message successfully sent!</p>"); } if the mail server is on your PC then it should be localhost as the host, else you have an essetially useless piece of software as your bypassing it.
  5. What grlayouts means is that Gmail (assumed from code) is disallowing you to connect on the smtp port specified... check with Gmail again to see if your using the right username format (some like just "username" some want "username@somesite.com" ) and re-check to make certain that your attempting all this on the right port (587 may or may not be correct, I'm not sure). If you still get errors, hit us back and we'll try again!
  6. God I'm an idiot! Thanks, sorry for wasting time!
  7. I want to be able to have a div (or any block) sit at the top of the screen... but stay at the top (relative to scroll). So when the pages is scrolled.. the div will stay at the top and not 'move' from its position relative to the browser... much like the bar Firefox has that tells you that a pop-up was blocked (I've seen site that had custom ones.. but never checked the code at the time.)
  8. function webPageActive($url) { $checkingState = @mysql_fetch_array(@mysql_query("select * from `table_of_urls` where `url`='$url'")) if($checkingState['site_active'] != 'TRUE') { exit("Sorry, this website is innactive at the moment"); } } function selfURL() { $s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : ""; $protocol = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/").$s; $port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]); return $protocol."://".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI']; } function strleft($s1, $s2) { return substr($s1, 0, strpos($s1, $s2)); } put this at the top of the pages to be checked: webPageActive(selfURL()); Just edit the sql and you should be right... pm me if you have any problems.
  9. you can do it with php if you must... but it'll involve either: AJAX or a page refresh.. You see, php is a Server-Side language. This means that it once the page loads is not able to communicate to the browser... You need Client-Side code for this, such as javascript (like in the above example) or AJAX(still javascript, but in a more round about method.)
  10. can php do this: $variable = 'some_variable'; $($variable) = 'the'; echo $some_variable; and get an output of 'the'. I know that Actionscript can and so can a few others.... but I was wondering if php can too..
  11. Update! I'm an idiot. all i needed to do was make another function using the normal function functionName(){ method that gets the value sent to it and then sets the global itself. that way its sent... and in the process proving my intellectually ineptitude. also CAKE IS A LIE!
  12. I'm just starting to venture out into the vast world of AJAX, only to have stumbled on what feels a rudimentary point. I've got a function: ajaxRequest.onreadystatechange = function(){ if(ajaxRequest.readyState == 4) { response = ajaxRequest.responseText; } } and I've got a global: var response = ' '; but when called the function seems not to change the variable (response) at all... I was wondering is there was a way to make it global... more global that is... I understand how to make a normal function behave correctly. But when set out like this: functionName = function() { I can't seemed to get it to work. Any help would be rewarded with admiration and gratitude... perhaps cake...
  13. Care to elaborate? or maybe give some direct link to the sitepoint articles
  14. I'd like to do a full text search on the rows returned from a previous full text search, in order to maximise the relevancy of the results
  15. I have to disagree with Cory94bailly, I'd say do NOT use php's mail() function... its very limited.. Sockets are much more secure, and can do more functions at once... While mail() is very limited in what it can do easily. I'd also caution you against POP connections in favour for imap functions; http://au2.php.net/manual/en/book.imap.php
  16. php is server side, that means it outputs after reading a file, but then has nothing to do with the file. I'd say what your looking for is AJAX related. (javascript at the very least). there may be a way to do it in php, but I've never crossed on sorry.
  17. The only way is to get rid of all the line breaks apparently. you could probably use explode to get rid of them. Like this: <?php $temp_explode = explode(' ', $url); $url = $temp_explode[0]; $temp_explode = NULL; ?>
  18. I apologise for those who viewd it but did bother to help, its rather unusual for members of this forum to do that.. You site views fine for me. (that's a "yes")
  19. Rendered how? did you mean like how they have a URL like: http://photosite.com/?image=12345 or did you mean resizing and resampleing?
  20. thats easy, if you want something like that just do this: <?php $image = file_get_contents('location/of/file/'.$_GET['name'].'.jpeg'); header("Content-Type: image/jpg"); exit("$image") ?> although, if your going to go that far, I'd use a database.
  21. I maintain that you are calling the mysql_connect function too much, and that it half the reason (if not all) for your troubles. if the databases are on the same server then call the server once ( via mysql_connect() ) and then call the database needed when its needed. like, this (try it, I think it should work....) <?php $hostname="localhost"; $username="root"; $password="tractor"; $database="apelmarja"; $conexiune=mysql_connect($hostname,$username,$password) or die ("Nu ma pot conecta la baza de date"); $bazadate=mysql_select_db($database,$conexiune) or die ("Nu gasesc baza de date"); $dataIN=date("Y-m-d"); $query="SELECT * FROM `actiuni_tran`"; if ($r=mysql_query($query)) while ($row = mysql_fetch_array($r)) { $simbol=$row['actiuni']; $database="bursa"; $bazadate2=mysql_select_db($database) or die ("Nu gasesc baza de date"); $query_up="SELECT `pret tran` FROM `stocks` WHERE `simbol`='$simbol' order by `time` desc limit 1"; $query_af_up=mysql_query($query_up); $query_ex_up=mysql_fetch_array($query_af_up); $pret=$query_ex_up['pret']; $database="apelmarja"; $bazadate=mysql_select_db($database) or die ("Nu gasesc baza de date"); echo $Simbolfirst." ".$PretTranfirst." ".$VolTranfirst."</br>"; $queryInsert="INSERT INTO `pret_actiuni` ( `id` , `simbol` , `pret` , `data`) VALUES ('','$simbol', '$pret', '$dataIN')"; mysql_query($queryInsert); } ?>
  22. Try fixing: "mysql_select_db("db_name")or die("Database connection was unsuccessful");" with: mysql_select_db($db_name)or die("Database connection was unsuccessful");
  23. Give this a try: <?php $dataIN=date("Y-m-d"); $query="SELECT * FROM `actiuni_tran`"; if ($r=mysql_query($query)) $conexiune=mysql_connect($hostname,$username,$password) while ($row = mysql_fetch_array($r)) { $simbol=$row['actiuni']; mysql_close($conexiune); $database="bursa"; $bazadate2=mysql_select_db($database,$conexiune) or die ("Nu gasesc baza de date"); $query_up="SELECT `pret tran` FROM `stocks` WHERE `simbol`='$simbol' order by `time` desc limit 1"; $query_af_up=mysql_query($query_up); $query_ex_up=mysql_fetch_array($query_af_up); $pret=$query_ex_up['pret']; mysql_close($conexiune); $bazadate=mysql_select_db($database,$conexiune) or die ("Nu gasesc baza de date"); echo $Simbolfirst." ".$PretTranfirst." ".$VolTranfirst."</br>"; $queryInsert="INSERT INTO `pret_actiuni` ( `id` , `simbol` , `pret` , `data`) VALUES ('','$simbol', '$pret', '$dataIN')"; mysql_query($queryInsert); } ?>
  24. Contact me at schme16@gmail.com, and I will fix the code for you, free of charge.
  25. http://au2.php.net/manual/en/function.mktime.php Read the manual, if that doesn't help, ask again.
×
×
  • 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.