-
Posts
3,584 -
Joined
-
Last visited
-
Days Won
3
Everything posted by JonnoTheDev
-
Make the urls friendly & also validate the parameters. instead of: http://demo.media-script.com/index.php?action=game&id=1316 use http://demo.media-script.com/games/arena-3/1316 Use a 404 header if the parameters are modified instead of displaying a valid page i.e http://demo.media-script.com/index.php?action=gasdasme&id=1316 You could end up with a search engine penalty for having duplicate pages if such links were posted around the internet.
-
Was the original text within that code snippet what is showing on the website right now? If so have you uploaded the file correctly after making changes? Have you attempted to add some simple text into the page just to see if it appears after you have uploaded the file i.e. <div id="aboutUs">test 123 This will give you an idea that you are editing the correct document! You need to find the portion of the script that is responsible for displaying the title element. It is not a one size fits all answer for sites written in ASP.NET. That is why I stated a lack of information. Posting a snippet of a document does not provide any clues. However, I am inclined to believe you are either not uploading the file correctly or are editing the wrong file.
-
There is such a lack of information here to give an answer. However seen as you have posted a tiny part of a template, doesn't the very first line stand out? The bit where it says Title= <%@ Page Language="C#" MasterPageFile="~/master/Website.Master" AutoEventWireup="true" CodeBehind="AboutUs.aspx.cs" Inherits="Web.AboutUs" Title="Funky Foto | Event Photography & Portraits | Manchester & Cheshire | About Us" %> Or is that something you have added? You need to figure out the structure of the code and the portion that is generating the page title.
-
LOL, every time you click on a photo you first see a picture of a dog asleep on your floor. This website is also incredibly slow and the hover effect you have on your homepage is very jittery.
-
OK, what if I want various machines in my network to use the web server as a proxy. They could be linux, mac, windows machines. Can I not use the IP address of the web server as the proxy address? The issue is, we have many pieces of software on different machines across our network that perform data mining operations. The different pieces of software use proxy servers to hide our true IP. We have many proxy server IP addresses stored in a database which each piece of software can connect to and pick a server to use. It is becoming expensive buying proxy server addresses, so my idea was to get a load of cheap servers and set them up as proxies. Their IP addresses could then be added to our database of proxies.
-
His wife must have been calling at the time. LOL.
-
Has anyone used a shared hosting web server and sucessfully setup a socks proxy on it? Would like some info on doing this to relay internet traffic from a local pc through the proxy.
-
Did you have someone strapped down next to the computer who answered another phone and switched it on when you called? I might get one of those for my washing machine and oven.
-
You will need longitude / latitude co-ordinates for each postcode. Then you can use the haversine formula to find things within a given distance of an originating point. Websites like Google Maps use this for instance when you need the distance between point A and point B. Resources http://en.wikipedia.org/wiki/Haversine_formula http://www.pjenkins.co.uk/blog/index.php/2007/04/04/uk_post_code_distance_calculation/ (doesn't matter that it is UK, same formula) Also take a look at: http://www.booking.com/city/gb/london.html You can see the formula in action. The blue module on the left shows places and landmarks that are near the current location (I think it is a 12km radius).
-
Mainly from contributions. Not from the software.
-
It really doesn't make any difference what you put in. Here's the comments in an osCommerce file: <?php /* $Id: contact_us.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ ?>
-
Never mind, I think this should work. RewriteEngine On RewriteCond %{HTTP_USER_AGENT} ^.*(up.browser|up.link|windows\ ce|iPhone|Palm|BlackBerry|iemobile|mini|mmp|symbian|midp|wap|phone|pocket|mobile|pda|psp).*$ [NC] RewriteRule ^(.*)$ http://www.foobar.com%{REQUEST_URI} [R=301]
-
Need help with following rule. Crappy at mod-rewrite. Need to redirect users to a mobile version of a site if a mobile device is detected. The pages on both sites are identical, so if a user on an iPhone goes to www.foobar.com/test-123.php it will 301 redirect to mobile.foobar.com/test-123.php So far: RewriteEngine On RewriteCond %{HTTP_USER_AGENT} ^.*(up.browser|up.link|windows\ ce|iPhone|Palm|BlackBerry|iemobile|mini|mmp|symbian|midp|wap|phone|pocket|mobile|pda|psp).*$ [NC] RewriteRule ^(.*)$ http://www.foobar.com [R=301] Obviously this just redirects to the root of the mobile domain. Need to redirect to the landing page.
-
Constantine. Keanu Reeves as John Constantine.
-
PHP Freaks Forums textareas all jumpy??
JonnoTheDev replied to woolyg's topic in PHPFreaks.com Website Feedback
Yes, I posted a while back regarding this. It is only an issue with Internet Explorer. I suggest using an alternate browser. This issue is also reported on the SMF forums. -
Ruby is a different language to PHP and it does have a different syntax. Rails is the framework for Ruby, it is not a language. There is no real difference in what it is capable of compared with PHP's Zend framework. They both offer command line project setup, MVC pattern, etc. It was popular because it was such a good framework at the time for rapid development. The Zend Framework has come on leaps and bounds since then. There is no real reason to learn Ruby if you are happy with developing in PHP.
-
Then you must already be working with linked table features. Think about the logic. If it is the last item, then the menu cannot exist as it requires sub menu records. remove the linked table features you have in place. You still require the foreign key relationship though. I would use simple queries to remove records as stated in my prev post.
-
Script that has worked for years suddenly stopped working...
JonnoTheDev replied to jamesloo48's topic in PHP Coding Help
I changed it to post seen as its using arrays. You may have copied the code to quick. Did a few adjustments. Try again. -
Script that has worked for years suddenly stopped working...
JonnoTheDev replied to jamesloo48's topic in PHP Coding Help
Here you go. This is a very weak script and needs a lot of improvement, however I will leave that upto you. This should work. <!---The Form---> <?php function display_form() { ?> <FORM TARGET="<?php echo $_SERVER['PHP_SELF']; ?>" METHOD="POST"> <br> <b>Name:</b> <INPUT TYPE=TEXT NAME="name"><BR> <br><br> 1) The Need To Succeed Is Very Important To You:<br> <INPUT TYPE=CHECKBOX NAME="no[]" VALUE="1">No <INPUT TYPE=CHECKBOX NAME="sometimes[]" VALUE="1">Sometimes <INPUT TYPE=CHECKBOX NAME="yes[]" VALUE="1">Yes <br><br> 2) To others, you are a man who can't keep his cool during a crisis:<br> <INPUT TYPE=CHECKBOX NAME="no[]" VALUE="1">No <INPUT TYPE=CHECKBOX NAME="sometimes[]" VALUE="1">Sometimes <INPUT TYPE=CHECKBOX NAME="yes[]" VALUE="1">Yes <br><br> 3) You believe that living now is more stressful than during your dad's time:<br> <INPUT TYPE=CHECKBOX NAME="no[]" VALUE="1">No <INPUT TYPE=CHECKBOX NAME="sometimes[]" VALUE="1">Sometimes <INPUT TYPE=CHECKBOX NAME="yes[]" VALUE="1">Yes <br><br> 4) Weekends is a time to give more thought to the work to come:<br> <INPUT TYPE=CHECKBOX NAME="no[]" VALUE="1">No <INPUT TYPE=CHECKBOX NAME="sometimes[]" VALUE="1">Sometimes <INPUT TYPE=CHECKBOX NAME="yes[]" VALUE="1">Yes <br><br> 5) You feel more frustrated than bored during a traffic jam.:<br> <INPUT TYPE=CHECKBOX NAME="no[]" VALUE="1">No <INPUT TYPE=CHECKBOX NAME="sometimes[]" VALUE="1">Sometimes <INPUT TYPE=CHECKBOX NAME="yes[]" VALUE="1">Yes <br><br> 6) You never feel angry or frustrated at yourself when things don't go well, or as you have expected it to be:<br> <INPUT TYPE=CHECKBOX NAME="no[]" VALUE="1">No <INPUT TYPE=CHECKBOX NAME="sometimes[]" VALUE="1">Sometimes <INPUT TYPE=CHECKBOX NAME="yes[]" VALUE="1">Yes <br><br> <INPUT TYPE=HIDDEN NAME="stage" VALUE="results"> <INPUT TYPE=SUBMIT VALUE="Analyse Me!"> </FORM> <?php } ?> <!---The Processor---> <?php function process_form($values) { $no_times = count($values['no']); $yes_times = count($values['yes']); $sometimes_times = count($values['sometimes']); if($no_times > $yes_times && $no_times > $sometimes_times) { $analysis = 'result1 here'; } elseif($no_times + $sometimes_times >= $yes_times) { $analysis = 'result2 here'; } else { $analysis = 'result3 here'; } print "<html><body><center>"; print "<b><font size=+1>".$values['name']."</font></b>,<br><br><br>"; print "<p align=left>".$analysis."<br>"; print "</body></html>"; } ?> <?php if(empty($_POST['stage'])) { display_form(); } else { process_form($_POST); } ?> -
MySQL has features when it comes to linked tables. For instance in your case if you delete a menu then all linked sub-menus will also be deleted. You can read up on this. However if you database is simple you can simply run 2 queries. Delete the single record from the parent table, then delete records from the linked table using the parent tables' primary key i.e DELETE FROM menus WHERE menuId=1 DELETE FROM sub_menus WHERE menuId=1 (menuId is the foreign key) If you are deleting a record in the sub_menu table nothing needs to happen in the primary table because it is a one to many join. i.e. 1 menu can have many sub menus. You should never leave records in a table that are disjointed as your tables will end up cluttered with rubbish and it could cause issue.
-
Script that has worked for years suddenly stopped working...
JonnoTheDev replied to jamesloo48's topic in PHP Coding Help
register_globals = bad, bad, bad Get your script updated in the manor PFMaBiSmAd has stated -
That would be a bespoke system. You could manipulate an e-commerce script. Have a look at oscommerce.com
-
Rails, yeah, i've played about with it. Never took it any further but it is good. You can set projects up from the command line, and is quite easy to make decent systems. If you want to get into rails, join a dedicated forum. If you want something similar from php, then learn the Zend framework. And PugJr, Ruby was in the 90's. In terms of a programming language, that is fairly new. Ruby on Rails is a framework for web development and came around in 2004. I think that is what the OP is talking about (seen as this is a forum surrounding web development and not software engineering)
-
Where are you advertising your services? If they are clients then surely they know what your rates are, or are these potential clients i.e. they have sent an enquiry. If so it is easy to ignore. If the client / potential client is aware of AJAX then they must be technically savvy, and know the amount of work involved. Let them go elsewhere if they can get rates like that. Thats not the sort of client I would want to be dealing with at all.
-
You don't need one. You get the client to sign your initial contract and attach an agreed specification before you undertake any work. Clients who are arsey will not sign a job completion form if they have issue. It should state in your contract that once the agreed specification has been met the work is complete. Anything outside of the specification is chargeable. If the client has not read the specification properly before signing the agreement and then starts being funny it is their own fault. You should take 50% of the project cost up front before starting any work.