- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 5
- Posts with Upvotes
- 4
- Upvoting Members
- 4
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
58 Posted Topics
Hey guys, I have the following code... And what I want it to do but cant get it to do is add up all the price fields and change the sum every time a number is changed or a new line is added... but its not working? Can anyone see … | |
Hey! Having some more fun with htaccess again! - I have tired everyhting and cant get it to play... Below is my code: RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{REQUEST_URI} !(/$|\.) RewriteRule (.*) %{REQUEST_URI}/ [R=301,L] RewriteBase /v2/ RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f # Admin Pages … | |
Hey! I have the following code for htaccess that directs /page/ to /page.php etc RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{REQUEST_URI} !(/$|\.) RewriteRule (.*) %{REQUEST_URI}/ [R=301,L] #RewriteBase / RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^([a-z0-9\-]+)/?$ $1.php [NC,L,QSA] However, I want to also add /admin/page/ that … | |
Hey! I am a bit stuck with my htaccess... let me explain how I want it to work... I have a wildcard subdomain, for example, demo1.domain.com, demo2.domain.com... I want htaccess to take whatever the subpart of the domain is and pass it as a variable... Options +FollowSymlinks RewriteEngine On RewriteCond … | |
Hey, I have the following htaccess file but cant get the dam thing to work... I need the following... /admin/test/ -> /admin/test.php /home/ -> home.php (/xx/ -> xx.php Then to include ?key=var.... etc RewriteEngine On RewriteBase / RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^admin/(.*) admin/$1.php [L] RewriteRule ^([a-z0-9\-]+)/?$ $1.php … | |
Re: Does what you have there not work... thats how I would do it but it might crash the server? | |
Hi, I have a field that a user add's a curreny value to, on keyup I fire a Javascript function that checks the following but its not working at all... What I want it to do is... user add's say 10 On keyup the Javascript needs to add .00 to … | |
Hey, I am working on a project that requires dynamic sub domains... for example user1.mydomain.com and user2.mydomain.com etc... But I am having some trouble... I have setup the wildcard A record and all of that is working fine. The problem is my application uses ajax and because the domain is … | |
Hi, I have the following htaccess file: <IfModule mod_rewrite.c> Options +FollowSymLinks RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} -f [NC,OR] RewriteCond %{REQUEST_FILENAME} -d [NC] RewriteRule .* - [L] DirectoryIndex /index.php RewriteRule ^([^/.]*)$ $1/ [R] RewriteRule ^([^/.]*)/$ /$1.php [QSA] </IfModule> This works fine, if I put for example /legal/ it loads up … | |
Hi All, I have the following script that works fine, it createds a png of the first page of a given PDF. However I also want to screenshot the first page of a .doc file. Can this be done with imagick as well? $im = new imagick($pdf.'[0]'); $im->setImageFormat("png"); $getfilename = … | |
Hey guys... I have some code im using in a sub directory called /manager/ and I have the following htaccess file RewriteEngine on RewriteOptions inherit RewriteBase / RewriteCond %{REQUEST_FILENAME} -f [NC,OR] RewriteCond %{REQUEST_FILENAME} -d [NC] RewriteRule .* - [L] Options +Indexes IndexOptions +FancyIndexing #Rules for root RewriteRule ^$ /index.php RewriteRule … ![]() | |
Hey guys, I am currently learning wordpress and I am having some trouble with Custom Post Types... I have added all the code for custom post types in my theme functions.php file however the links to the single posts done seem to work... they just go to my 404 page? … | |
Hey guys, I am having some trouble with json_decode... I used json_encode to encode a string that is the following: {"id":"121","firm":"DSD","address":"Test","address2":"Test","city":"Test","region":"Test","postcode":"Test","countryid":"13","firmtype":"Marketing","phone":"01545454587","fax":"","email":"dan@test.com","url":"http://www.test.com","mainuser":"Dan","contacts":"dan@test.com","info":"","numstaff":"15","numoffices":"1","disc":"","cat":"{"35":"1"}"} And I am using this php code to try and get it back into an array... however its just not working... the print_r(); doesnt echo anything out at all... … | |
Hi! I have the following table: <table width="63%" border="0" align="right" cellpadding="0" cellspacing="0" class="findUsResults"> <tr> <th align="left">Company</th> <th align="left">Location</th> <th align="left">Products offered</th> <th align="left">Distance</th> </tr> <tr> <td rel='1'>Company Ltd</td> <td>Town</td> <td><a href="/stockists/ajax.php?id=3" class="various fancybox.ajax">Click to view</a></td> <td>0.9 mil</td> </tr> <tr> <td rel='2'>Company Ltd</td> <td>Town</td> <td><a href="/stockists/ajax.php?id=5" class="various fancybox.ajax">Click to view</a></td> <td>11.56 … | |
Hey Guys, I am having some trouble... I have the following XML from Google: <GeocodeResponse> <status>OK</status> <result> <type>street_address</type> <formatted_address> 1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA </formatted_address> <address_component> <long_name>1600</long_name> <short_name>1600</short_name> <type>street_number</type> </address_component> <address_component> <long_name>Amphitheatre Pkwy</long_name> <short_name>Amphitheatre Pkwy</short_name> <type>route</type> </address_component> <address_component> <long_name>Mountain View</long_name> <short_name>Mountain View</short_name> <type>locality</type> <type>political</type> </address_component> <address_component> <long_name>Santa … | |
Hey, I have the following code and I am trying to get Google Maps API to add a parker to each location and thats working fine! However, I cant seem to get my tab's working in each info window? Here is my code: <script type="text/javascript"> var locations = [ ['Jackson … | |
Hi Guys, I have the following code in a massive string... but there all different: ##component5#?1,4,1## They all start with ##component and end with ## but the bit in the middle can be anything... and I need to remove this text completely from the string... What would be the best … | |
Hi All, I have a WordPress installation at the following: http://www.domain.com/wordpress/ However I need some help... When a use goes to http://www.domain.com I want it to redirect to http://www.domain.com/wordpress/ however I want to hide the /wordpress/ so the user only sees http://www.domain.com But it still needs to work with links … | |
Hey guys, I have a script that will resize an image, .jpg, .png or .gif The .jpg works fine! But the .png doesnt work at all and I just cant get it to work... On from URL I get the following: ‰PNG IHDR,Éᘧ Why is this? I have a … | |
Hey guys, I need some help with preg_replace() I have something like this.... {$gallery_20} And I want to use preg_replace to replace it with nothing.... however gallery_20 can be anything... but im not sure on the patten... Can anyone help please? I don't understand how to change all this.... $patterns … | |
Hey guys, I am looking to encrypt some data into a database, however it will need to be decypt to be read... I know there is the base64 commands but im looking for something a little more secure? Does anyone know of any good solutions? Dan | |
Hey, We have a good few websites that use Google's reCAPTCHA and in the past 24 hours spammers have been bypassing the reCAPTCHA... has anyone else been having this problem?? Or know of a fix. Spammers haven't been able to use the form until last night when somehow they got … | |
Hey guys, How would I work out the date range for the current week...? Then +1 week or +2 weeks time... I hope you understand... So... This week... 20.02.2012 26.02.2012 +1 week will be 27.02.2012 04.03.2012 I will set an offset url variable Thanks Dan | |
Hey guys, I need a bit of help... I have the following.... [CODE] <input name="title[1]" type="text" id="title[1]" size="30"> <textarea name="desc[1]" id="desc[1]" cols="50" rows="5"></textarea> <textarea name="keywords[1]" id="keywords[1]" cols="50" rows="5"></textarea> <hr> <input name="title[2]" type="text" id="title[2]" size="30"> <textarea name="desc[2]" id="desc[2]" cols="50" rows="5"></textarea> <textarea name="keywords[2]" id="keywords[2]" cols="50" rows="5"></textarea> <hr> [/CODE] Thing I want to … | |
Hey guys, I am in the process of making a website that will take file uploads for different things... 1. Add Photos to a project 2. Add Profile photos 3. Add Gallery photos But I was to use the same uploader for each section of the site but im not … ![]() | |
Hey, My following code doesnt seem to be working, it doesnt change the onclick function when you click the image... can someone please help me? Jquery is includes at the top of my page... [CODE]<script type="text/javascript"> function addfav(id){ var div = '#fav_'+id; $(div).attr("src","images/star.png"); $(div).unbind('click'); $(div).click(function() { removefav(id); return false; console.log('did … | |
Hey... Can anyone help me fix this error please... [CODE]Parse error: syntax error, unexpected T_STRING in /mailer.php(45) : eval()'d code on line 1[/CODE] Line 45 is [CODE]eval("\$body = \"$body\";");[/CODE] But im not sure how to fix it :/ Dan | |
Hey, I am having some trouble with Google Maps API... I have the following code: [CODE]function geocodePosition(pos) { geocoder.geocode({ latLng: pos }, function(responses) { if (responses && responses.length > 0) { updateMarkerAddress(responses[0].formatted_address); } else { updateMarkerAddress('Cannot determine address at this location.'); } }); } [/CODE] However this shows the full … | |
Hey, I am a programmer in PHP Procedural and have just applied for a new job to further my career as a PHP Programmer, however they said it's advised to learn PHP OOP... so I have been watching some tutorials about PHP OOP and it just looks like OOP is … ![]() | |
Hey guys! I have the following script... Resize works... Scaleup works... but watermark, black and white doesnt work or sepia... Can anyone see why? Or help? Thanks Dan [CODE] <?php header ("Content-type: image/jpeg"); ini_set("memory_limit","80M"); /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ REQUIRES PARAMS: path - path to file from domain root w - sets width to … | |
Hey, I have a database of events... and I need to add a row for each day for a year... so there will be 365 rows in the database, but the date format must be as follows: Row 1 Start Date: 2012-01-01T00:00 End Date: 2012-01-01T23:59 Row 2 Start Date: 2012-01-02T00:00 … | |
Hey, My code epic fails... I get delivery failed when sending an email to the email addess that pipe's to this script: [CODE]#!/usr/bin/php -q <?php ini_set('memory_limit', '256M'); //The concern here is having enough mem for emails with attachments. // read from stdin $fd = fopen("php://stdin", "r"); $email = ""; while … | |
Re: Be good to see this script! :) Dan | |
Hey, I have the following code: I am trying to make it so when you tick the box it changed the result to what you clicked, then if you untick it it changes the result back... There will be multipal tick boxes on a page... Here is my code... [CODE]<script … | |
Hey, I have 2 scripts, one processes an ajax request and sets a session in that script but I cant seem to get the session to work in another script... (echo the session out) on the same server just a different file? Can anyone help? Dan | |
Hey, I am trying to get this working but failing! I am trying to make it so when you click the heading it opens the nab to do with that heading, and remember it... so next time you go onto the site it will remember what tabs you had open … | |
Hey Guys, I need some help... I have the following code: [CODE]$dueinQ = mysql_query("SELECT * FROM `invoices` WHERE `status` = '10' OR `status` = '11' OR `status` = '9'"); while($dueinR = mysql_fetch_assoc($dueinQ)){ $inv_due = $dueinR['duedate']; $eofy = $dueinR['eofy']; $datediff = $inv_due - $eofy; $days = floor($datediff/(60*60*24)); if($days > 365){ //Do … | |
Re: To toggle something use jQuery and .toggle() [url]http://api.jquery.com/toggle/[/url] This will toggle display:none; Edit something like this... [CODE]<script type="text/javascript"> $('#clickme').click(function() { $('#cell').toggle('slow'); }); </script>[/CODE] | |
![]() | Re: Does it have to be those DB types? Or is mySQL good for you? |
Re: First of all, I think you mean Dreamweaver? and I am not 100% sure what your asking... Do you have the file in the correct xampp folder? | |
Hi, Can anyone help me as to how I would handle recurring invoices in PHP I have it making invouices with a due date... but say I wanted to mark an invoice to auto invoice every month... how would the script work and what data is needed to do that? … | |
Hey, I need some help with working out if a timestamp is today or not... Eg - 1318245850 is Today - 1286709850 isnt today... Dan | |
Hey, I have a textfield and before I insert it into the database I run the function nl2br(); It works grand add's <br>'s at brake lines... However when I output it back into a textfield to edit it and update the record it had the <br>'s? Not a brake line... … ![]() | |
Hey, I need some help, I need my script to loop through a directory of images and only delete images that contain "t.jpg"... Here is my looping script... [CODE] <?php // First we need to loop through the files.... $image_dir = $_GET['dir']; if(!opendir($image_dir)){ echo error_msg("Ooops... This Album contains no images"); … | |
Hey, I need a bit of help... I am trying to create a simple invoice script... but im stuck on the invoice lines... I think I can use javascript to add more lines when the user clicks a button but then not sure how to process that list as I … | |
![]() | Re: I have no idea whats your talking about, can you explain more? Dan ![]() |
Re: Personally, I learnt PHP from looking at other peoples code... then using php.net to research the functions =) Hope this helps. Dan | |
Hey Guys, I have the following script... I also have a drop down list of all Towns and Cities in the UK... When a user changes the location I need the google map marker to love to that city... but allow the user to move the marker and show the … | |
Hey All, I am after a HTML select file that has all the UK towns and cities in it does anyone know of one? Dan | |
Hey, I need to get the last ID from my mysql database and add +1 to it. I saw this mysql_insert_id(); but it looks like it only gets the last insert id? But what happens if the last query was a different table? Dan |
The End.