8,966 Posted Topics
| |
Re: [url]http://httpd.apache.org/docs/2.0/misc/security_tips.html[/url] [url]http://dev.mysql.com/doc/refman/5.6/en/security-against-attack.html[/url] | |
Re: Not sure what your input represents, but you could replace all double comma's and remove all spaces. ![]() | |
Re: That's pretty vague. Try again with more details. | |
![]() | Re: Some typos: [CODE]//role.php file <?php $name_var = 62; echo '<form method="POST" action="update_role.php">'; echo "<select id=\"dropdown\" name=\"$name_var\">"; // WRONG QUOTING HERE //option tags in here... echo '</select>'; echo '<input type="submit" name="btn_update" id="button" value="Update" />'; echo '</form>'; ?> //update_role.php file <?php $name_var = 62; $getVar = $_POST[$name_var]; // FORGOT THE DOLLAR SIGN … ![]() |
Re: Why all those queries if just one does the job: [CODE] $sql = "SELECT `blog_category`.`id`, `blog_category`.`cat_name`, `posts`.`post_title` FROM `blog_category` INNER JOIN (`posts`) ON `blog_category`.`id`=`posts`.`post_category_id`"; $rows = mysql_query($sql); $cat_name = ''; while ($data = mysql_fetch_assoc($rows)) { if ($cat_name <> $data['cat_name']) { echo "{$data['cat_name']}<br/>"; $cat_name = $data['cat_name']; } echo "{$data['post_title']}<br/>"; } [/CODE] | |
Re: I don't think there is much else you can do, except for maybe caching your results somehow (if possible). | |
Re: Why would you want to print in PHP ? For a special print style, you can use CSS. | |
Re: What server language are you using (for sending the e-mail) ? This cannot be done with just javascript (the validation can, but it is best to do it again on the server). | |
Re: Have a look at [URL="http://www.daniweb.com/web-development/php/threads/334106"]this thread[/URL]. | |
Re: Set DefaultDrawing to False. | |
Re: Try [iCODE]StrToFloat()[/iCODE], then divide by 100. | |
Re: This will solve part of it: [code] <table width="86" border="0" align="center"> <?php $count = 0; while($show_std = mysql_fetch_assoc($get_stds)) { if ($count % 4 = 0) echo '<tr>'; echo "<td class='std_success_td'><img class='stdpic_success' src='uploads/{$show_std['std_pic']}' /></td>"; if ($count % 4 = 3) echo '</tr>'; $count++; } ?> </table> [/code] | |
Re: Personally, I would use [iCODE]is_numeric()[/iCODE] on the age as an extra check, as well as checking an upper and lower boundary (say 0-110). For sex I would explicitly check for your allowed values, or maybe default to one of them if the data is incorrect. | |
Re: The way it is done on some sites: after buying a key is generated (and the zip file in a protected location) in the database and e-mailed to the buyer. He can then access a download.php using that key. After 30 minutes, the key expires and the download.php will not … | |
Re: I don't think you can set this in your crontab. You can however add a check to your script. Set some database record while it is running. If the script is executed, first check this record. If it has the running value, abort, otherwise continue. | |
Re: In line 12 you should remove the [iCODE]![/iCODE] | |
Re: Your query is wrong, typo in FROM. Also read the sticky thread in this forum on how to find out what is wrong. | |
Re: [QUOTE=bbizzl;1687203]As of right now the script emails everybody but just not in the correct email format.[/QUOTE] Please explain, what format is not correct ? | |
Re: Instead of Reset and Seek, you could use Append. | |
Re: You can read an rss file with SimpleXML for example. Generating an rss feed is simply turning your records into a well-formed xml file. | |
Re: [url]http://veerasundar.com/blog/2009/07/how-to-change-xampp-server-port/[/url] | |
Re: That means your query failed. Try: [CODE] $result = mysql_query($sql) or die(mysql_error()); [/CODE] | |
Re: [url]http://feeds.feedburner.com/SilverAndGoldPrices[/url] | |
Re: These files can only be used in combination with Navicat or their Report Viewer. I suggest you contact Navicat for an online solution. | |
Re: Have you enabled the mssql extension in the php.ini ? In wamp it is disabled by default. | |
Re: The solution is a lot of hard work checking and fixing your HTML and CSS for all browser inconsistensies. There is no simple solution. | |
Re: This process from Google describes a valid method to authenticate calls: [url]http://code.google.com/apis/maps/documentation/webservices/#SignatureProcess[/url] | |
Re: See the example given in [URL="http://www.daniweb.com/web-development/php/threads/374239"]this thread[/URL]. | |
Re: This will probably fix it: [CODE] fputs($fp, "{$_POST['Fullname']},{$_POST['Jobtitle']},{$_POST['email']},{$_POST['file']},\n"); [/CODE] | |
Re: If you search this forum, you'll find several solutions. | |
Re: A preg will not suffice, as there can be more classes separated by a space. Have a look at preg_replace_callback. You pattern will look something like this: [CODE=text] / class="(.*?)"/ [/CODE] | |
Re: You keep opening and closing the mysql connection. Try opening it before your loop and closing it when you are done. | |
Re: Personally, I'd use a database to store which domain should use which query vars. As soon as someone enters a new domain, you'd have to check which (if any) you should allow. For example in your youtube link there could be session/language/etc query vars, which you don't need. I don't … | |
Re: A newline only works within a <pre> tag. | |
Re: Hard to say, I assume it's not working ? If the file is not deleted, check if $file contains a full path, or a relative one. The problem could be in deleteFile(), so show what it does. | |
Re: A CSS only theme can get you quite far I think. Just make sure your building blocks can be accessed by id's, and similar items by classes. | |
Re: Do you need this in a database table, or in PHP ? | |
Re: Can you give an example of what you want as output. Next, post the code that sets the facilities property. | |
![]() | Re: The way you describe it, it sounds like the timetable should be a part of the user. And yes, protected can be accessed only by ancestors and descendants. ![]() |
Re: Add a hover image, so when someone moves over it, it moves. | |
Re: "Fatal error: Cannot redeclare makeRandomPassword() (previously declared in C:\Program Files (x86)\EasyPHP-5.3.8.1\www\Test\Scripts\register.php:76) in C:\Program Files (x86)\EasyPHP-5.3.8.1\www\Test\Scripts\register.php on line 88" The function you declare on line 88 is already declared in your register.php. If you really need that function, give it another name. If it is the same as in register.php remove … | |
Re: The value of a textarea should be between the tags, not in the value attribute: [CODE] <textarea> textarea value goes here </textarea> [/CODE] | |
Re: [CODE] if (isset($_POST['q'])) { $var = $_POST['q']; } if(isset($_POST['txttablename'])){ $tbl_name = $_POST['txttablename']; } [/CODE] $var and $tbl_name are only given a value, if their POST counterpart is set. You should give them a default (empty) value. I usually do this: [CODE] $var = isset($_POST['q']) ? $_POST['q'] : ''; $tbl_name = … |
The End.