Jump to content

tomfmason

Staff Alumni
  • Posts

    1,693
  • Joined

  • Last visited

Everything posted by tomfmason

  1. Google has ~200 indexed pages for my personal site but yahoo only has 23. It has been up and running in it's current state for nearly 5 years.
  2. I always use Plantronics usb headsets because they are good quality and reasonably priced Also, I removed the links in your post because they where spamish and pretty much unrelated to the question asked in the thread
  3. $(document).ready(); waits until the entire page has finished loading. You can read more here Thanks . I am using a python CMS using a framework called Django that I helped develop called Mezzanine. Although mine is a highly customized version with a lot more than is in the default package.
  4. try the following exactly as I have it here: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $(".loaders").hide(); }); </script>
  5. That is because you need to add the jquery script tag like in my example. Also if you are using jquery use something like this $(document).ready(function(){ $(".loaders").hide(); });
  6. All elements should have unique IDs. It seems like you are confusing ids with classes. Mulitpule elements can have the same class but not the same id. This is why the first, or last depending on the browser, element is being hidden. I would recommend adding a class like "loaders", "hideme", etc. I rarely write raw javascript anymore because most frameworks make this extremely easy. For example you could do the following with jquery <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#hideLoaders").click(function(){ $(".loaders").hide(); }); $("#showLoaders").click(function(){ $(".loaders").show(); }); }); </script> <a href="#" id="hideLoaders">Hide Loaders</a> <a href="#" id="showLoaders">Show Loaders</a> <div class="loaders">Loader 1</div> <div class="loaders">Loader 2</div> <div class="loaders">Loader 3</div> <div class="loaders">Loader 4</div> <div class="loaders">Loader 5</div> <div class="loaders">Loader 6</div> From this example all the div's have the class name "loaders" and can hidden simply by $(".loaders").hide();
  7. I haven't used this from an app yet but I do remember seeing something about in the docs. After searching the developer documentation I think I found it in the old deprecated documentation for dashboard.multiAddNews. If I am not mistaken the same syntax should work for the new mention feature.
  8. as long as you don't have an id column in the csv it will automagically insert the id for you like normal.
  9. Yes, this can be done easily by exporting your excel file to a csv and then importing that directly using mysql. Here is an example of what the query would look like: LOAD DATA LOCAL INFILE '/path/to/your.csv' INTO TABLE `table` FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (`field1`,`field2`,`field3`); If I am not mistaken(it has been a while since i have done this) you will need to remove the top line from the cvs otherwise the column list at the top will also get inserted as a new row
  10. I copied the code from my production server. Can you explain a little further? It's working, so I'm not sure what I didn't close, but I would like to fix it. Not trying to highjack the thread by the way, just trying to learn. you have the following: <?php for($x=0; $x<=$items; $x++) { $id=$result[$x]['pol_id']; $thing=$result[$x]['pol_policy_number']; $options.="<OPTION VALUE=\"$id\">".$thing; } ?> where it should be: <?php for($x=0; $x<=$items; $x++) { $id=$result[$x]['pol_id']; $thing=$result[$x]['pol_policy_number']; $options.="<OPTION VALUE=\"$id\">".$thing . "</OPTION>"; } ?>
  11. What you are wanting is a simple ajax request that fires on the select's onSelect event. I would recommend using jquery or some other related javascript framework. Writing this using jquery would be very easy. For example: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#select").change(function(){ $.ajax( "file.php?selected=" + $(this).val(), "success":function(data){ $("#results").html(data); } ) }) }); </script> <select id="select"> <option> something </option> <option> something2 </option> <option> something3 </option> </select> <div id="results">shows mysql database results here, depends on item we have chosen</div> Whenever you select a new option in the drop down an ajax GET request will be sent to file.php with the value of that option in the GET param "selected". In the file.php you would access it via $_GET['selected'] @thomasw_lrd You forgot got the close the option tags in the code you posted.
  12. Google would not like you having duplicate content. They would hit you pretty hard for it afaik.
  13. there are a few ways of going about this but I think using the DATE function would be the easiest. SELECT `field` FROM `table` WHERE DATE(`datefield`) = 'YYYY-MM-DD';
  14. I use a company called calpop. For most basic needs their cheapest server should be fine. Each server comes with 10mbs unmetered, 4gb ram, and 1tb ds for less than $70/month.
  15. In the code above you use several queries that are not needed and I don't see where you clean any user input. You can update multiple columns from one query e.g. UPDATE table SET field1='foo',field2='bar' WHERE something="Whatever"; You should make sure that you clean your input with mysql_real_escape_string and type cast any integers e.g. <?php $id = (int) $_POST['id']; $category = mysql_real_escape_string($_POST['category']); ?> Also, I am not really sure why you change the value of the ID
  16. This topic has been moved to CSS Help. http://www.phpfreaks.com/forums/index.php?topic=342058.0
  17. okay, I got bored and decided to go a head and do this for you download.php <?php function userAuthorized() { //implement your code here for user authorization return true; } $download_dir = "/path/to/download/dir/"; $filename = basename($_GET['file']); $file = $download_dir . $filename . ".csv"; $path = realpath($file); if(($path !== false) && file_exists($file)) { if(userAuthorized()) { header("Content-type: application/csv"); header("Content-Disposition: attachment; filename=$filename.csv"); header("Pragma: no-cache"); header("Expires: 0"); echo file_get_contents($file); } else { header('HTTP/1.0 401 Unauthorized'); echo "You must be logged in to download this file"; } } else { header('HTTP/1.0 401 Unauthorized'); echo "No such file"; } ?> Also, here is a simple rewrite rule that will allow you to do like downloads/yourcsv.csv instead of downloads/download.php?file=yourcsv RewriteEngine on RewriteRule ([^/\.]+)/?.csv$ download.php?file=$1 [L]
  18. why not have the user linked to a script like download.php?file=yourcsv. In download.php you would check to see if they are logged in, check to make sure the csv file requested exists and then simply use headers to force a download <?php header("Content-type: application/csv"); header("Content-Disposition: attachment; filename=file.csv"); header("Pragma: no-cache"); header("Expires: 0"); echo file_get_contents("file.csv"): ?> That code would obviously need some work and was only meant to serve as a ruff example
  19. I have a few "autoblogs" targeted at "niche" markets that are making some money. Although the return, thus far, has hardly been worth the initial work involved (keyword research, design, development - I hate WP and it's autoblog). I guess I could package the app and sell it but I am lazy and don't really care. Some of my facebook apps also make a little money from advertisements and my personal blog makes a whopping ~$12/month from google adsense. Overall the money brought in from in all of them combined is not all that impressive in my opinion.
  20. I could be mistaken but I don't think you can fade the background image itself. You would have to create a temp element(div etc) absolutely positioned behind everything else and fade it.
  21. in the example you are using you have two hidden fields with the same name. which will always use the second hidden field's value. You may need to rethink the way you are doing this. Why don't you just use GET in your script instead of POST. If you did this you could simply link to test5.php?recipe_name=Tea%20Cookies etc. Otherwise you will need to change the value of your hidden input field when the user clicks the link. Like so: <html> <head> <title>Form16 April 11</title> </head> <body style="background-color:cyan"> <h2 style="text-align:center">Recipe Index </h2> <hr> <script language=javascript> function submitPostLink(obj) { document.getElementById('recipe_name').value=obj.innerHTML; document.postlink.submit(); } </script> </head> <body> <form action="test5.php" name=postlink method="post"> <input type="hidden" id="recipe_name" name="recipe_name"> <a href=# onclick="submitPostLink(this)">Anise Pizzelles</a> <br> <a href=# onclick="submitPostLink(this)">Tea Cookies</a> <br> </form> <hr> </body> </html> Also, when posting any code, please use the blocks to wrap it.
  22. We do not delete accounts or allow users to have multiple accounts. Please read our Forum Rules
  23. Problems with this thread: 1) you bumped it twice in one day -- nearly once per hour since you posted 2) no code whatsoever -- this is a board for php coding help. Which implies you have existing code that you need help with. Please take the time to read our Rules and Terms of Service.
  24. The web development market has been flooded for a long time now and from what I have seen it is hard to get started anymore. When I first started using odesk, elance and vworker(another good one imo) I had to take smaller easy projects and under bid them. I did this so I could build up some positive feedback quickly. After completing ruffly 20-30 projects like that I was then able to get in on some of the larger projects. This also lead to a few more long term projects with a few fairly large development firms. For me, the greatest stumbling block was the lack of education in any related fields. I have since overcome this by 7 years of experience and tons of positive feedback. edit You may also want to consider working on a few opensource projects. This will provide proof of experience and generally looks good to prospective clients.
  25. This topic has been moved to PHP Coding Help. http://www.phpfreaks.com/forums/index.php?topic=328393.0
×
×
  • 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.