- Strength to Increase Rep
- +13
- Strength to Decrease Rep
- -3
- Upvotes Received
- 91
- Posts with Upvotes
- 77
- Upvoting Members
- 60
- Downvotes Received
- 3
- Posts with Downvotes
- 3
- Downvoting Members
- 3
Re: If you are trying to stop users from manipulating the url, you can use a csm of the url to validate it. I have been using this method for years, to prevent people from changing the id in a url to edit a record that they shouldn't be editing (I … | |
Re: Yes. Everything you need can be found using google. I have answered several similar questions on daniweb so make sure you search the site as well. | |
Re: ok sounds pretty easy. how do you want the images displayed on the page? in a table? | |
Re: Here is one I made last Saturday for a current project of mine. This one allows for a lot of control over how its displayed. [code=php] <?php class calendar { private $time = null; private $adjusted_time = null; private $select_date = array(); private $current_date = array(); private $last_day = null; … | |
Re: Depends on the gateway you want to use. Which one are you talking about? | |
Re: you need to use a constuctor [code] <?php class test { var $name = array(); //this function used to make class PHP4 compatible function test() { $this->__construct(); } function __construct() { $this->name = array('john','jenny'); } function getName() { return $this->name; } } ?> [/code] | |
Re: You could try this: [code] <?php if ( isset( $_POST['submit'] ) ) { //Check if form was submitted $name = 'image'; $allowed_extns = array('jpg','jpeg','gif','png'); if ( !isset( $_FILES[$name] ) || $_FILES[$name]['error'] !== UPLOAD_ERR_OK || empty( $_FILES[$name]['name'] ) ) { echo 'Please choose a file to upload'; //File was not uploaded … | |
Re: Here is a login system example I created awhile ago: [url]http://www.daniweb.com/forums/post832028-20.html[/url] and [url]http://www.daniweb.com/forums/post832231-23.html[/url] See if that helps you. Its secure and a good script to learn from. | |
Re: Not possible without a third party (unless you own your own wireless company with their own network) | |
Re: Code is usually helpful. Post some and we should be able to help. | |
Re: Use: [code] echo $_POST['security1']; [/code] and get rid of the or die() statement as that is not how its suppose to be used. Don't use: [code] if ($_POST['security1']) { [/code] You need to use isset() otherwise you will get errors. | |
Re: how exactly is the manual set up. Is it a webpage; is it seperate document, what? can you give me link to it so i can see what we're working with? | |
Re: I recommend a prebuilt library for that. Trying to setup the headers yourself, which will work across many different mail servers and clients is not easy. You could try PHPMailer or Swiftmailer. There are plenty of libraries that will make this easy to do. | |
Re: that doesn't do anything. php is putting that to the browser, not the javascript. view the source of the page. there will be nothing in the write function of the javascript. how about you accept the truth. its how php works. you would think if that was possible you wouldn't … | |
Re: sometimes i found that the form will submit the field with nothing and add it to post array. you need to check and make sure the username is also not empty. you can do this by comparing it to an empty string or use the empty() function. example: [code] if … | |
I recently applied for a PHP programming job and they required me to do a coding challenge. One of the challenges involved simulating the card game war which I found intriguing. I "over-engineered" it as they requested, but I still don't think it was good enough for them. Is there … | |
Re: You need to add your functions parameters to the function in the interface. [code] interface db { public function connect($server,$username,$pasword); public function close(); public function error(); } [/code] | |
Re: Please at least google your question before posting here. [url]http://www.google.com/#hl=en&q=create+folder+with+php&btnG=Google+Search&aq=f&oq=create+folder+with+php&fp=OlAWEoQSgPM[/url] mkdir() is the function you are looking for. | |
Re: A playlist of Breaking Benjamin, Stone Sour, Sevendust, Three Days Grace, and some T-Pain to change it up. | |
Re: Date formats of the date() function need to be wrapped in quotes: `$blah = date('m-d-Y');` | |
Re: What version of php are you using? Also what have you changed in the script, because what you have there is not the same as the files I downloaded for the site you just gave. | |
Re: Use `if ( isset( $_POST['submit'] ) ) {` | |
Re: The only way to get them to work together is to copy exactly how joomla hashes their password. I would say, find the JUserHelper class and look how the getCryptedPassword function is working. | |
Re: Is that javascript? If so, then I don't think there is much of a difference. I personally use `var blah = [];` to define an array. | |
Re: The best way to handle this is by processing the payment on your website directly. If you have to use an external payment gateway, the best way to handle that would be to create the reservation before sending them to the payment gateway. After they complete the payment, using a … | |
Re: Something basic I just wrote: <?php $data = file_get_contents('url here'); $lines = explode( '<br />',$data ); foreach( $lines as $line ) { $line = explode( '|',$line ); $datum = array(); foreach( $line as $part ) { list( $key,$value ) = explode( '=',$part,2 ); $datum[$key] = $value; } //insert query here … | |
Re: If you wanting to allow some html I recommend the HTML Purifier library. Kind of bulky but does the job. The other way to prevent it from breaking your site, is to run the text through htmlentities so it will display as text no matter what. | |
Re: Is this a homework assignment? If so, we will not just give you the answer. I will, however, help you find the answer yourself. You will need the functions range(), shuffle(), and sort(). Look these up on php.net. | |
Re: Looks good. The only things I would add is caching and css/js minification for faster loading times. I implemented this into my framework a few years ago and it has worked quite well. Makes debugging a little harder but worth it. | |
Re: Shouldn't `/(?!=` at the beginning be `/(?!`? Not a regular expression expert, but I don't remember the != together. Haven't used lookarounds in awhile. |