505 Posted Topics

Member Avatar for tscina
Member Avatar for eerlewein

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 …

Member Avatar for blocblue
0
642
Member Avatar for code739

select CONCAT(a.col1, ', ', b.col1) AS `fused` from table1 a left join table2 b on a.id=b.table_a_id

Member Avatar for code739
0
294
Member Avatar for matusekm

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 …

Member Avatar for GliderPilot
0
177
Member Avatar for OsaMasw

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 …

Member Avatar for simplypixie
0
945
Member Avatar for Djmann1013

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.

Member Avatar for blocblue
0
118
Member Avatar for klemme

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

Member Avatar for diafol
0
226
Member Avatar for doha786

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);

Member Avatar for blocblue
0
91
Member Avatar for cussel

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?

Member Avatar for LastMitch
0
354
Member Avatar for masocha

@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`

Member Avatar for blocblue
0
307
Member Avatar for hwoarang69
Member Avatar for SagarSe7en
0
176
Member Avatar for eduard.ferrer.71
Member Avatar for eduard.ferrer.71
0
186
Member Avatar for baig772
Member Avatar for baig772
0
217
Member Avatar for jamojo

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 …

Member Avatar for jamojo
0
194
Member Avatar for samiyahg
Member Avatar for shahai.ali

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.

Member Avatar for shahai.ali
0
166
Member Avatar for Rizi004

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 …

Member Avatar for adam.adamski.96155
0
137
Member Avatar for Synestic

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 …

Member Avatar for blocblue
0
216
Member Avatar for chr.s

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 …

Member Avatar for blocblue
0
199
Member Avatar for jcl1290

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 …

Member Avatar for blocblue
0
217
Member Avatar for vizz

> 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.

Member Avatar for vizz
0
440
Member Avatar for xbat

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 …

Member Avatar for xbat
0
3K
Member Avatar for Luckychap

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 …

Member Avatar for allencarter180
0
509
Member Avatar for websponge

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.

Member Avatar for websponge
0
610
Member Avatar for rjony321

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 …

Member Avatar for Bachu
1
217
Member Avatar for Buppy

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 …

Member Avatar for ckchaudhary
0
127
Member Avatar for LastMitch
Member Avatar for LastMitch
0
457
Member Avatar for Riu 2009
Member Avatar for Zanzertuchi

> 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.

Member Avatar for Tyler W. Cox
0
371
Member Avatar for rotten69

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 …

Member Avatar for broj1
0
178
Member Avatar for vijayram

The option is called **disabled** not **disable**. $('.planspace-image').draggable({ disabled: true });

Member Avatar for vijayram
0
163
Member Avatar for muhammad.waleed.9699

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; ?>

Member Avatar for blocblue
0
888
Member Avatar for priya667

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 …

Member Avatar for diafol
0
2K
Member Avatar for divyakrishnan
Member Avatar for blocblue
0
64
Member Avatar for pete.carrick.7

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'); …

Member Avatar for blocblue
0
122
Member Avatar for fahad.tariq

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 …

Member Avatar for blocblue
0
140
Member Avatar for HasNor

You could also use `$count = mysql_num_rows($result);` after line 14, but before the start of the while loop.

Member Avatar for blocblue
0
149
Member Avatar for Synestic

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. …

Member Avatar for blocblue
0
96
Member Avatar for LastMitch

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;

Member Avatar for LastMitch
2
197
Member Avatar for saadi06
Member Avatar for blocblue
0
108
Member Avatar for code739

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] . '-'; }

Member Avatar for singhboy
0
203
Member Avatar for Goldfinch
Member Avatar for HunainHafeez

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.

Member Avatar for jstfsklh211
0
250
Member Avatar for Hypalink

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();

Member Avatar for blocblue
0
216
Member Avatar for sammry

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

Member Avatar for sammry
0
131
Member Avatar for daniel36

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?

Member Avatar for DarkMonarch
0
213
Member Avatar for bagehot43

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' }, // ... });

Member Avatar for bagehot43
0
253
Member Avatar for mariano.bolanos

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 …

Member Avatar for blocblue
1
348
Member Avatar for duneflyingyfz

Set the timezone for use by your PHP code. `date_default_timezone_set('EST');`

Member Avatar for duneflyingyfz
0
200
Member Avatar for ditty

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 …

Member Avatar for blocblue
0
90

The End.