- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 9
- Posts with Upvotes
- 7
- Upvoting Members
- 7
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
62 Posted Topics
Re: One thing I noticed is that you said the user has 3 tries to log in. A problem with that you aren't including a time limit for those tries- what if a user fails 3 tries over a period of 2 weeks? You don't want to lock them out for … ![]() | |
Re: Hello there, and welcome to DaniWeb. I'm not a moderator or anything other than a regular old poster here, but I can tell you that two things will not get you the help you are looking for: 1. Requesting things to be made for you. As I understand it, this … | |
Re: For working on a few files or making quick edits, usually Notepad++ does just fine. When I'm working on a project, Netbeans is definitely my choice. Especially if I'm working with a 3rd party utility, API, or framework, I really appreciate that it gives me the ability to view in-line … ![]() | |
Re: This is a pretty complex thing you're trying to pull off if you're planning on using all custom code. What I would do is create the OS and then use 3rd party (and open-source) code to include the features. The reason is just that building your own features (such as … ![]() | |
Re: These functions seem to be along the line of what you're looking for: * [strrpos](http://www.php.net/manual/en/function.strrpos.php) *Find the position of the last occurrence of a substring in a string* * [substr](http://php.net/manual/en/function.substr.php) Return part of a string So, you could use `strpos` to find where the last `.` character occurs in the … ![]() | |
Re: I would say it would be a concern. Generally, you want to keep the front end as far away from the back (eg. your database) end as possible. Especially if it's for ecommerce where you could be handling some sensitive data on your site (but even just in general), I … | |
Re: MySQLi (MySQL Improved) is a PHP driver for MySQL databases that offers functionality more commonly desired in Object-Oriented programming. It may be useful if you are using Object-Oriented PHP (OOPHP), but for smaller stuff it's mostly a matter of preference. The developers of PHP seem to recommend the MySQLi driver … | |
Re: I'm a hobbyist-gone-pro, and I can share some of the feelings of intimidation when it comes to learning concepts like OOP, MVC, and new frameworks. I'd advocate for the approach where you do it yourself (at least the first time), especially with an MVC approach. It's incredibly valuable to be … | |
Re: Can you provide which CMS you are using, or any code you are using to process the data submitted in your FCKeditor form? The issue is probably due to something with one (or both) of those two things, especially if your CMS (or one of its plugins) was updated recently. … | |
Re: [QUOTE=evstevemd;1695547]Suppose user have JS disabled![/QUOTE] I personally don't support non-JS browsers most of the time, and I'd agree with broj1's 3rd suggestion ("let know the user that he can not participate"). Many (most) sites are incredibly dependent on javascript to function properly, even if they do offer 'graceful degradation'. While … | |
Re: Are you running this on a remote server or from your own machine's localhost? If you are testing on localhost (or if your remote server doesn't have PHP mail configured) you are likely to have issues sending mail. | |
Re: I seem to jump on threads that ardav has posted on a lot, but I wanted to chime in here just to advocate the usage of [I]print_r()[/I] and [I]var_dump()[/I] when struggling with an array-related issue. I consider these two functions to be extremely useful, and personally can say that once … | |
Re: If I'm reading this correctly, you have been able to split the string variable $str into an array. Assuming you have named the new array $str_array, you could do something like this: -Iterate through the array and for each value in $str_array, use strlen() to count the number of characters … | |
Re: I can see a problem with the structure of your if/else conditions. Currently your innermost code where you calculate [I]$time[/I] and [I]$walktime[/I] and print your outputs will only be executed if [I]$_POST['dal'][/I] and [I]$_POST['chi'][/I] are both set. If I'm understanding what you want to do correctly, the user would select … | |
Re: Some comments to document your code and a little bit of extra information about your specific question/issue would go a long way. I did read through the code you posted, but it's a bit unclear (to me, at least) as to what you are attempting to do (which is why … | |
Re: Definitely check out this link for extra info on usage and syntax: [url]http://php.net/manual/en/function.preg-match.php[/url] Using this will require a bit of knowledge of regex (REGular EXpressions), which can be a pain and confusing at first, but definitely good to be familiar with, as regex can be used in many languages. Essentially, … | |
Re: Not sure what you were trying to do, but since this forum is a community for learning, it would be nice if you could post your solution so that others could learn from it as well :) | |
Re: You will need to set an event that fires when each button is clicked. You should give your buttons id attributes in their HTML tags. In the javascript, make a function that, depending on the id of the button that was clicked, appends the HTML for a new row consisting … | |
Re: What about listing each video link, and when the link is clicked it opens up in a foreground frame (eg. [URL="http://fancybox.net/"]Fancybox[/URL]) that loads the video based on parameters sent to the frame via javascript? That way, when the foreground frame is closed, it could trigger a function that stops or … ![]() | |
Re: *Edit- I understand now after thoroughly reading page 2. I'm going to do some hunting- I wrote a PHP application that does almost this exact same thing. When I find it, I'll put a link to the source files if you'd like. | |
Re: I know this is marked as solved but I've done this before and wanted to add my two cents if I may. I have a custom CMS that does this, and here is my process, which I feel is pretty simple, as all images can be in the same directory: … | |
Re: [QUOTE=asif49;1593728]I've set up a home server (as far as I know it's called that). I'm using xampp and use "localhost/" to access the page on google chrome. Are you saying that if this was hosted on the web then this problem would dissapear?[/QUOTE] Most likely. Every time I've encountered this … | |
Re: NetBeans, definitely. Others may say Eclipse or Aptana, but I personally prefer NetBeans for PHP. Netbeans also supports Zend, CodeIgniter, Symfony, as well as others via plugins. | |
Re: Don't replace the single quote with doubles, in line 20, the issue is with the double quotes in [B]border="0"[/B]. Those should be changed to single quotes, as seen here: [CODE]<?php $groupname = $_REQUEST['groupname'] ; $info = $_REQUEST['info'] ; $size = $_REQUEST['size'] ; $special = $_REQUEST['special'] ; $firstname =$_REQUEST['firstname'] ; $lastname … | |
Re: Can you be more specific about what you mean by "protecting"? Do you mean you want to hide/obscure the variable or its params from the user, or something else, like making your application securely use a $_GET variable? | |
Re: So, are you just wanting a counter for each page, or something that tracks the links that each individual visitor clicks on? So basically, is this site-specific or user-specific? | |
Re: You could make an object in JavaScript for each node you need and define whether it's an absolute parent (has no ancestors), a parent and a child, or an absolute chile (has no descendents). Then have a method that sets an array to define the arrays in parents, and when … | |
![]() | Re: Sorry that this is not completely specific to your problem, but since you said "Unfortunately, it's the regex I've been struggling with. I trying to do this 'a_key'(whitespace)=>(whitespace)'(content_to_replace)' for it, but I'm going around in circles." Might I suggest something like [URL="http://www.regexbuddy.com/"]Regex Buddy[/URL]? Regex always hurts my head, and I … ![]() |
Re: [CODE=html] <form name=form1 method=post action=send_contact.php> <p>Emne:</p><input name=subject class=input type=text id=subject size=64> <br /><br /> <p>Forespørgsel:</p><textarea name=detail cols=50 rows=7 id=detail></textarea> <br /><br /> <p>Navn:</p><input name=name class=input type=text id=name size=64> <br /><br /> <p>Email:</p><input name=customer_mail class=input type=text id=customer_mail size=64> <br /><br /> <input type=submit name=Submit value= Send > <input type=reset name=Submit2 value= Ryd formen > [/CODE] … | |
Re: Quick question- are you accessing these pages with 'localhost' in your URL? The reason I ask is because you said you were getting the full code in Chrome, which shouldn't happen if you're accessing the pages through your Xampp server. | |
Re: Try this: [url]http://jqueryfordesigners.com/coda-slider-effect/[/url] It uses jQuery and does a pretty good job of things. I've used it and liked it a lot. Plus, you can customize it to your heart's content fairly easily after it's all set up. | |
Re: I think it may be your data flow (not sure because I haven't tested it), but I believe this will work: [CODE] if (Todays_Date >= Target_Date) { clearTimeout(timeoutID); alert("Timeup, Submitting exam...."); $('#testForm').submit(); return; } [/CODE] or, if that doesn't work, try this: [CODE] if (Todays_Date >= Target_Date) { clearTimeout(timeoutID); var … | |
Re: I thought you were using phpMyAdmin, not Administrator for MySQL? Your thumbnails looks like they're showing an error for Administrator for MySQL, which probably doesn't affect your MySQL installation. Which system are you trying to use? Or is the problem that you can't access MySQL at all? ![]() | |
Re: What are you currently setting the cookies' expiration date to? If you don't set it to anything, then they will expire automatically when the browser closes. If you're trying to automatically log the client out after, say, 15 minutes of inactivity, then you will need a system to monitor the … ![]() | |
Re: I think you need something like this: [CODE=php] $extract = mysql_query("select * from tbl_competition WHERE fld_closed='N'"); if (mysql_num_rows($extract) > 0) { while ($row = mysql_fetch_assoc($extract)) { //Do your thing with the data } } else { //No rows from MySQL //Put your redirect stuff here } [/CODE] And yeah, where … | |
Re: I may be off-track, but are you meaning that you want the drop-down values to populate as you go? Ie, you select a value from "Width" and based on that selection you are offered options for "Profile" and then offered options for "Size" based on the two previous selections. Do … | |
Re: Have you tried using mysql_fetch_array() instead of your while() loop? It may make things a bit easier for formatting. Like this: [CODE=php] $query = "SELECT * FROM CLIENT WHERE id = '$id'"; $result = mysql_query($query) or die('Error querying database.'); while ($values = mysql_fetch_array($result)) { $rid = $values["id"]; $rfname = $values["fname"]; … | |
Hello, I'm working on a site that is a web representation of a magazine (for your reference: [URL="http://jettisonquarterly.com"]http://jettisonquarterly.com[/URL]). You can view and "flip" through the entire magazine's most current issue. The problem is that since the site's content is designed for a specific aesthetic in inDesign and each page is … | |
Hi all, This is my first time posting in this forum (disclaimer: please let me know if this is not the right place to post this). I'm turning to the Linux server discussion gurus for some sagely advice :) I have a VPS web server running CentOS with Apache and … | |
Hi, Using jQuery 1.4.4 with the Roundabout plugin. Something weird is going on here and I can't put my finger on it. I have a function set up that changes the text of a <span> when a new image is called into focus. It gets called in $(document).ready like so: … | |
Hi all, I've been struggling with different ways to solve a problem for about a week, and as my attempts have so far been fruitless, I figured I would turn to DaniWeb for some help. I have an unordered list <ul class="navigation"> where each list item contains some links. Example: … | |
Re: You won't be able to keep your changes if all you're doing is having PHP process a form and then display the results because you're not saving it anywhere. Two solutions: 1. Have the PHP that processes your form and then writes the output to a file that you can … | |
I know a lot of people have their own comforts and styles when it comes to scripting and coding, but... Some language documentations specifically state a naming convention that is considered best practice for their language, like Java specifying camelCase. However, PHP's online documentation doesn't specify a naming convention (from … | |
Re: [B]Disclaimer:[/B] I scanned this thread but didn't read it like a book. However, I recently made an application for a store that does almost exactly what you are doing- a "Point of Sale" php application. It took some testing of various possible implementations, but this is the setup I came … | |
Re: You have two main problems here: 1. Uploading doesn't seem to be working, so there's no file for to attach to the e-mail. You can't merely declare a variable called $target_path and have the file go anywhere- you need to copy it from PHP's temp directory to your upload directory … ![]() | |
Re: Why declare $n=2 on line 1 and then $n=$e on line 3? I realize you are using "less than or equal to" in your for() loop but is it possible you're getting undesired output because you are reassigning $n? It seems redundant, at the very least. And listen to ardav- … ![]() | |
Re: Hopefully I'm understanding you right, but it seems that a simple solution would be to have your form processing script check whether the box was checked and deal with it through an if then statement. So if the checkbox in your form is called "department_head_checkbox" and it has a checked … | |
Hi All, I'm sorta stuck on this one. Hopefully some of you folks can help me out... My question in a nutshell: Is there a way to have PHP extract all of the files from an archive without preserving the directory structure? Extra Info: A site I'm working on allows … | |
Re: All of your checkboxes have the same name attribute, which will cause problems when you're trying to determine what was checked. Try giving each checkbox a unique name, even if it is something like "cb1", "cb2", etc. And give each of them a value of "1". Then when you process … | |
Re: Everything looks good- you just forgot to add the tag to make the image a link. The only change I made was in line 6: [CODE=php] <?php $img_array = glob("images/Coupons/*.{jpg}",GLOB_BRACE); //Pick a random image from the array $img = array_rand($img_array); //Display the image on the page echo '<a href="whatever.php">'.'<img alt="'.$img_array[$img].'" … |
The End.