505 Posted Topics
Re: Omit the first 200 addresses from the mailing list. | |
Re: You cannot redirect the user to one page, whilst still submitting the form details to Sales Force in the manner you're trying. I did something similar a few months back and chose to use cURL to post the form values directly to Sales Force. I've taken the code from an … | |
Re: select CONCAT(a.col1, ', ', b.col1) AS `fused` from table1 a left join table2 b on a.id=b.table_a_id | |
Re: Welcome to the forum. There are quite a few examples showing how to validate form fields within the forum already. Here's a comprehensive reply I posted previously, which may be of some use. You say you're new, so reply back if it's too complicated for the time being, and we … | |
Re: You need to use a join. If you only want results where they appear in both tables, you need an inner join. I'm not sure why you need to query both tables when you're passing the user id to the query. You could simply select the data directly from the … | |
Re: PHP is processed server side. So the browser will only affect what input is sent to the server. Perhaps if you expand upon what isn't working, that might shed some light on the issue. | |
Re: Something like this should work: RewriteEngine On RewriteRule (.*) http://www.sitename.dk/index.php?page=$1 [QSA,L] Examples: /hello http://www.sitename.dk/index.php?page=hello /hello/world http://www.sitename.dk/index.php?page=hello/world /hello/world?foo=bar http://www.sitename.dk/index.php?page=hello/world&foo=bar ![]() | |
Re: You're nearly there. You weren't multiplying the original number by the resulting factor. Also, you can simplify your code into a single function. E.g. function factorial($number, $count = 1) { if($number) return $number * factorial($number - 1, ($number - 1) * $count); return 1; } echo factorial(5); | |
Re: I don't think anyone has replied to your post, because it isn't clear exactly what you're trying to do. Perhaps you could try to explain it a little more clearly? ![]() | |
Re: @GliderPilot - I do not believe that you can access an object property which has a numeric name in that way. Instead you'd need to use: `$object->{'23'}[0]->id` | |
Re: Hi Eduard, perhaps you could post your code thus far. | |
Re: Any reason you're not just using the built in WordPress pagination functionality? | |
Re: Seeing as the static variable is protected, you can only access it directly from within the class, or using a public method outside of the class. To get the variable value from within the class, you can use `self::$_table_name` and outside of the class, use the static method as defined … | |
Re: Hi Sami, perhaps you could post your code thus far. | |
Re: In your example, the category data is stored in an attribute, rather than within the node itself. You therefore need to use the XPath: `/product[1]/categories/category/@path` where the @ shows you want to target an attribute. | |
Re: Where are you calling the function `mf_dbinsert`? Seeing as you're not explicitly listing the table columns, are you inserting a value for every field? If not, that is the likely cause of your error. Either explicitly list the column names, or ensure a value for every field, including the ID … | |
Re: Hi Brad, In answers to your questions: 1. Yes, it's fine to do it that way. 2. If you're consistent in the way you delimit the subcategories in your database field, e.g. using a semi-colon, then there's no reason why you couldn't use a single row. I would be tempted … | |
Re: I've not used Big Cartel before, but looking at the API link you posted, it looks as though the following function would allow you to access the data you require. <script type="text/javascript" charset="utf-8"> $(function() { Product.findAll({}, function(products) { $.each(products, function(i, product) { $('#products').append('<li><img src="' + Product.findImage(product.images[0].url, 'large') + '" /><br/><a … | |
Re: You can seed the `RAND()` function with an integer value. If you were to use the current hour of the day as the seed for example, then your query would return the same results in the same order for a whole hour, and then change during the subsequent hour, and … | |
Re: > Can anybody write code for me? Many of the rewrite code snippets posted in this thread to what you have asked. They're not working due to the server configuration. To solve your problem, you now need to be focussing your attention on ascertaining what that problem is. | |
Re: If I have understood you correctly, then you need to retrieve the total stock value from the database for all boxes that match either the first, or second colour selected. Without seeing your database schema, I cannot write an exact query, however hopefully the following will point you in the … | |
Re: Technically you're not meant to have text in a div, it should be nested within another container, but the following would work... [CODE] <div id="example"> [INDENT]this is my text[/INDENT] </div> #example { [INDENT]width: 200px; text-align: center;[/INDENT] } [/CODE] However you would need a width value, otherwise the div would naturally … | |
Re: Why can you not use the iframe method? If the temporary location is a part of the same form that is submitted to the iframe, the value will be passed to the server when the form is submitted. | |
Re: If else statements are executed base on the condition specified. Looking at your code, whenever the amount is greater than 0, it will always match the first if block. if the amount isn't greater than 0, it will always match the else block. You might consider trying a switch statement … | |
Re: I'm not aware of any native function, or plugin that does specifically that task. You could try a backup plugin, like [Backup Buddy](http://ithemes.com/purchase/backupbuddy/), which will create a full backup of your entire site (including uploads). You could then download and unzip the backup and extract specifically the uploads folder. Backup … | |
![]() | Re: You'll want to use the .attr function. $slides.find('img:last').attr('alt', this.alt).prependTo($slides); ![]() |
Re: > That is indeed very silly; it'd be nice if everything worked consistently wouldn't it! If you want consistency, you could use a JavaScript framework. The code bases are usually very small, and they provide tried and tested functions for common tasks, including AJAX requests. | |
Re: This is probably obvious, but I'll say it just to make sure. Don't just display edit and delete buttons if the user id against the post matches the currently logged in user. When a user clicks the edit or delete option, you need to make sure that the request is … | |
Re: The option is called **disabled** not **disable**. $('.planspace-image').draggable({ disabled: true }); | |
Re: You say the #hide div should be shown only if the status equals E. Are you referring to the status column returned by your query? If so, could you not use this: <?php if($row['status'] == 'E'): ?> <div id="hide"> <!-- HTML table here --> </div> <?php endif; ?> | |
Re: If you haven't come across this resource already, I found it useful: http://www.velvetblues.com/web-development-blog/how-to-parse-html-files-as-php/ It talks about the type of handler you need to use based on whether you have one or multiple versions of PHP installed. If using multiple, you need to explicitly specify `application/x-httpd-php5 .html`, but there are a … ![]() | |
Re: You can find a very simple guide here: http://www.w3schools.com/jsref/jsref_obj_regexp.asp | |
Re: Post your HTML. What have you tried so far? A JavaScript framework could help make that fairly straightforward. jQuery for example has checkbox and checked selectors. For example: jQuery(function($) { $(document).on({submit: function(event) { if($('#form :checkbox :checked').length < 1) { alert('Please select at least one option'); return false; } }}, '#form'); … | |
Re: An alternative to JavaScript, is to explore using the PHP [SessionHandler](http://php.net/manual/en/class.sessionhandler.php) class. This allows you to hook into the logic that is called when sessions expire or are garbage collected. When a user logs in, if you stored their session id against their profile in the database, you could log … | |
Re: You could also use `$count = mysql_num_rows($result);` after line 14, but before the start of the while loop. | |
Re: If you copied and pasted the text, it should have preserved the line breaks. These however do not show in HTML and need to be converted to break `<br />` tags. There's a handy function in PHP for doing this called `nl2br();`. Simply pass your string through that before displaying. … | |
![]() | Re: So you have your form with an element called radius. In your `radius.php` file, just retrieve the value from the URL. <?php $radius = isset($_GET['radius']) ? (float)$radius : 0; echo $radius * M_PI; ![]() |
Re: Yes. Just specify the value for d. E.g. SELECT a, b, c, 'my value' as d from table; | |
Re: Have you thought of trying something like: $alphabet = range('A', 'Z'); for($x = 0; $x < 256; $x++) { $i = ($x <= 25) ? $x : $x % 26; echo $alphabet[$i] . '-'; } | |
Re: You're using a sub-query for the department. It needs to be wrapped in brackets. E.g. $query = "select registrationNo,name,fatherName,cnic,gender,discipline,department,admissionSession,email,password,address,domicile,contactNo,status,currentEmployer,designation,salaryInfo,totalExperience,lastOrganizationname,organizationAdd,organizationPhno,organizationEmail,Remarks from students where registrationNo='$RegNo' AND department = ($Dep)"; Alternatively, you could write the query using a join, thus avoiding the need for a sub-query entirely. | |
Re: You could create a unique hash using the user's IP address and their browser info. E.g. $hash = sha1($_SERVER['REMOTE_ADDR'] . $_SERVER['USER_AGENT']); However, the session id is unique too and would last for the duration of the user's visit. session_id(); | |
Re: Have you tried using an inner join, and ordering by the number of sales descending? SELECT `u`.*, COUNT(`s`.*) AS `total_sales` FROM `users` `u` INNER JOIN `sales` `s` ON (`s`.`userid` = `u`.`userid` AND `s`.`status` = 'delivered') ORDER BY `total_sales` DESC LIMIT 10 | |
Re: Have you set the character set for your page? `<meta charset="UTF-8" />` Are you pulling the content from a database? Is that configured for UTF-8 character encoding too? | |
Re: I thought the data in the $.ajax function should be passed as an object. E.g. $.ajax({ url: 'getimages2.php', type: 'post', data: { 'js_var': 'value' }, // ... }); | |
Re: Well running the parmaters you've provided through the MD5Encrypt function, using the MD5 key above, in both lower and uppercase provides MD5 info values of: 0db46e59925d21ca6dd57cdb0d81d616 // Lowercase ef3e31841e34a8b0ea8907aec77b6375 // Uppercase Neither of these seem to match the MD5 value returned by the server, which to me would suggest either … | |
Re: Set the timezone for use by your PHP code. `date_default_timezone_set('EST');` | |
Re: I might have misunderstood what you're trying to do, but it sounds like you meerly wish to forward all emails from info@domainname.com to your.account@gmail.com. Is that correct? If so, you want to look at setting up mail forwarding for info@domainname.com to your Gmail account. This can usually be done via … |
The End.