205 Posted Topics
Re: take a look at [array_keys](http://php.net/manual/en/function.array-keys.php) maybe something like... $array_keys = array_keys($_POST); foreach($array_keys as $key){ echo $key." = ".$_POST[$key]; // or whatever you want to do here } | |
Re: If I understand your question correctly you should be able to use [is_null](http://php.net/manual/en/function.is-null.php) to check the field has a value before printing. example: while($row = mysql_fetch_array($result)){ ... if (!is_null($row['photo'])) //print image ... | |
Re: You may also need to set the collation of your database, tables and/or fields to support the extended character set. EG: # Create New Database with UTF8 Collation CREATE DATABASE `testdb` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; # Create new table with UTF8 collation and UTF8 field CREATE TABLE IF … | |
| |
![]() | Re: I also use [notepad++](http://notepad-plus-plus.org/), and I like [Programmers Notepad](http://www.pnotepad.org/) as well. There is also [PSPad](http://www.pspad.com/). For online editing, some editors have ftp capability or addons (I know notepad++ does) that let you edit files locally that reside on a remote server. Also check out these links http://sourceforge.net/projects/ontext/ (now defunct, but … |
Re: I assume that your `connect.php` includes a call to [mysql_connect](http://www.php.net/manual/en/function.mysql-connect.php) ... are you also checking to make sure the connection is successful? Should your password hash be before tring to connect to the DB? | |
Re: it can depend on many things including differing versions of software installed on the server and the development machine (such as PHP or mysql). It could also be different database configuration, assuming you are reading from an existing table to gather the data for your updates. I suggest checking for … | |
Re: Both JorgeM and hericles are correct in their points. The reason your DataList is not visible when you initialy start the app is because `SqlDataSource1` has no query and thus `DataList1` will contain no data and not display. | |
Re: the problem lies in the difference between browsers interpretations of the [box model](http://www.w3schools.com/css/css_boxmodel.asp). Unfortunately, until all browsers decide to conform, universally, to the w3 standards, this is a frustration we all have to work with. There are ways ([css hacks](http://css-tricks.com/snippets/css/css-hacks-targeting-firefox/)) to add styling that is only interpreted by specific browsers. … | |
Re: > $outputstring = "</br><b>" .$name. " </b> le <?php > echo date('d/m/Y') ; > ?> a <?php > echo date('G:i') ; > ?> a ecris:<hr/>" .$area. "</br>" ; I think what you want is something like this $outputstring = "</br><b>" .$name. " </b> le ".date('d/m/Y')." a ".date('G:i')." a ecris:<hr/>" .$area. … | |
Re: you need to escape the string before saving it to the database. In other words, `str_replace("'","'",$filename)` or better yet, use the function [mysql_real_escape_string](http://au2.php.net/manual/en/function.mysql-real-escape-string.php) It's good practice to perform this escaping on any user input string prior to saving to the database, as it helps prevent both errors and SQL Injection … | |
Re: function [substr](http://au2.php.net/manual/en/function.substr.php) | |
Re: sounds like you need to [configure the SMTP server](http://www.php.net/manual/en/mail.configuration.php) for PHP to use. | |
Re: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.aspx | |
Re: I haven't tested this, but it should give you an idea of how to modify your existing loop to include the page breaks. $db_results = $wpdb->get_results("SELECT * FROM table"); $counter = 0; foreach ($db_results as $result) { if ($counter % 40 === 0) echo '<table><thead><th>Name</th><th>Number</th></thead><tbody>'; echo '<tr>'; echo '<td>' .$result->name. … | |
Is anyone familiar with PDFlib? I'm having trouble geting it to run. Running a WAMP server, PHP 5.2.16, followed the instructions to install the appropriate version of the DSO, the PHP monitor recognises that the extension is loaded, but when I try to use it I just get undefined function … | |
Re: You should be able to check for the HTTP response code, either via an exposed property/function return of the WebBrowser control itself, or manually in the page headers. If the response code is an error (say 400, page not found) you could `navigate "about:blank"` or whatever else you want to … | |
Re: Insert [syntax](http://dev.mysql.com/doc/refman/5.5/en/insert.html) is wrong INSERT INTO table_name [(column_names, ...)] VALUES (value [, values...]) In other words INSERT INTO leads (`facility`, ...) VALUES ('{$facility}', ...) ![]() | |
Re: The easiest way is probably to use a third party service like paypal or google checkout. When you sign up they usually provide you with sample code and instructions for how to incorporate it into your site, and they handle all the security side of things so you don't have … | |
Re: [MySQL Workbench](http://www.mysql.com/products/workbench/) is the official utility from MySQL, although I find [Toad](http://www.quest.com/toad/) more user friendly for most things, and it has some more features like DB compare. | |
Re: what exactly do you mean by not available? you could try something like if (img == null || img == DBNull.Value) { // no data returned | |
Re: try abs positioning the `hr` also, there is an extraneous `</p>` in there. | |
Re: try removing the `<br/>`s from between each link and add `display:block` to the `a` style properties. Also make sure the `margin` and `padding` is set to 0px; Let me also make the suggestion that it is better to use the `class` attribute to identify groups of controls to apply the … | |
Re: I don't think you need php, but you will probably have to use some javascript or something if you want to force the link to be downloaded or saved. You could use the [URL="http://www.w3schools.com/TAGS/att_a_target.asp"]target[/URL] link attribute if you just need to stop it from opening in the same window as … | |
Re: I run [WAMP](http://www.wampserver.com/en/) for development purposes. There is an easy setup and configuration guide that can get you up and running quite easily. | |
Re: afaik PHP has never done this for input values by default. Form input values are available via the `$_POST` variable on the server. If you want to pass them via the url, I think you have to construct the url yourself as a string and link or redirect to it. … | |
Re: can you post an example? link or sample code, something we can test. | |
Re: I think this section is wrong. (lines 24-27) > echo" > $image = $sql['image']; > base64_decode($image); > echo "$row[image]"; > "; Try something like the following in its place. echo '<td><img src="image.php?id='.$row['image_id'].'" /></td>'; then create a new file called `image.php` with the following content. <?php session_start(); include("connect.php"); $sql = "SELECT … | |
Re: Not sure tbh. I would recommend recreating the .htaccess file one line at a time, and testing to see that each line works. At least this should allow you to isolate the specific statement that is causing a problem, and hopefully narrow down *why* it is a problem in the … | |
Hi All I'm looking for ideas or suggestions about how to implement this feature. The concept is I have 2 dropdown select boxes, with data that is not directly related (in the sense that there is no identifiers or foreign keys or anything within the data itself) but that have … | |
Re: With the number of different versions of firefox available over the last 12 months, it could be specific to any one of them. I am running v10 and v12 and have not experienced any issues viewing the site. I'm not sure what level of detail you are getting in your … | |
Re: I believe you can do it like this: eval("var " + key + " = " + value); | |
Re: The problem is that your binary data (ie: image content) contains characters that are invalid in a mysql string. Take a look at the [LoadFile](http://dev.mysql.com/doc/refman/5.5/en/string-functions.html#function_load-file) function if you have the image file available on the server, or you can [escape the string](http://php.net/manual/en/function.mysql-real-escape-string.php) in PHP prior to passing it to the … | |
Re: those two outputs would be quite different. given an example; id=1, type='X', name='test', location='here': > "\n\t<li><a href=\"posts.php?ID={$arr['id']}+{$arr['type']}+{$arr['name']}\">{$arr['name']} {$arr['location']}</a></li>"; " <li><a href="posts.php?ID=1+X+test">test here</a></li>" > "<a href='posts.php?id='".$arr['id']."&type=".$arr['type']."'>".$arr['name']." ".$arr['location']."</a>"; "<a href='posts.php?id='1&type=test'>test here</a>" It all depends on your desired result, but I see nothing wrong with your orriginal link code. Allow me to point … | |
Re: I have a site that does exactly this. .htaccess <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> ./index.php <?php /** Tells WordPress to load the WordPress theme and output it. */ define('WP_USE_THEMES', true); /** Loads the WordPress Environment and Template */ … | |
Re: try using a [noscript](http://www.w3schools.com/tags/tag_noscript.asp) tag | |
Re: ou ... but maybe you didn't mean symmetrically opposite. Is this a trick question? | |
Re: You should still be able to use books that reference VS web developer edition. VS Pro includes more features, but should encompass everything in the web dev version. The general methodologies, tools and techniques used for building ASP.NET pages will be the same. | |
Re: > <form action="" method="post"> Don't you still need to specify the current page address for the postback to work? *disclaimer: it's entirely possible I'm wrong...* Also, for debugging purposes you could add `print_r($_POST)` to the top of the page to see what the actual post data contains on submit. | |
Re: so, you want to move the background image to the right? background-position-x: 5px; and try `background-position: 50px 200px;` on your body background to move the image lower and to the right. | |
OK, let me preface this by stating that this is for an internal application only, so security is not a major concern and we can/do have a fair amount of control over the users browser, operating environment and configuration. I am currently generating some hyperlinks, like this: <a title="L7489" id="MainContent_GridView1_lnkFolderR_1" … | |
I have a datasource on my page, the select query of which creates a pivot table. The complexity is that the columns in the pivot are determined by records in another table (the users table). So I have to use a prepared statement to build and execute the pivot query, … | |
Does anyone know a good way to force javascript to evaluate all operands in a boolean expression? In particular, what I am tring to do is essentially this: return isValid(a) && isValid(b) && isValid(c); while this technically does work, the function is responsible for highlighting invalid areas on the form … | |
Re: QWERTY by necessity of using laptops, not to mention phones and other devices. My GPS frustrates the hell out of me that its on-screen keys are in alphabetic order. Although I do like the theory behind the DVORAK, after so many years of programming myself to qwerty I'm affraid its … | |
Re: Immidiately, I can see that the ` endforeach ` needs a semicolon. Also, lines 7-11 look like they need to be inside a `<?php ... ?>` block. Outside of these observations, are you getting any specific error messages? | |
Re: agreed... My preference would be to disable it and use the tooltip to explain why. Removing items can cause general confusion as the interface layout dynamically changes - generally try to keep things as consistent as possible. In my experience message boxes have a tendency to become annoying especially if … | |
Re: you could use arrays in the element names ... eg: `<select name="filter[0]">` access via `$_POST['filter'][0]` etc. | |
Re: It is not difficult, though a little finicky as you have to use the `DirectoryEntry` and/or `DirectorySearcher` objects. here is the official guide: http://msdn.microsoft.com/en-us/library/ms180906(v=vs.80).aspx And some other examples to get you started; http://www.daniweb.com/software-development/csharp/threads/339418/active-directory-search-filter-syntax-help http://stackoverflow.com/questions/7915145/get-all-users-from-a-group-in-active-directory | |
Re: I believe that Natural Joins are more akin to inner joins than left joins. Have a read of the Natural Join section [here](http://en.wikipedia.org/wiki/Join_(SQL)) and in particular note the dangers described as modifying table structure will result in differences in output. Listing the tables in a from clause, as I understand … ![]() | |
Re: Are you typing into this textbox or setting it programatically? If typing, then the event would be triggered for every key press, and thus you will experience multiple successive postbacks. If any other function/event occuring is changing the text in code on PostBack, it could be triggering an additional postback … |
The End.