Posts
 
Reputation
Joined
Last Seen
Ranked #165
Strength to Increase Rep
+13
Strength to Decrease Rep
-3
96% Quality Score
Upvotes Received
91
Posts with Upvotes
77
Upvoting Members
60
Downvotes Received
3
Posts with Downvotes
3
Downvoting Members
3
59 Commented Posts
~266.73K People Reached
Favorite Tags

708 Posted Topics

Member Avatar for loopylouis

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 …

Member Avatar for Shoaib_10
0
3K
Member Avatar for ayesha789

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.

Member Avatar for AhsanZaman
0
8K
Member Avatar for tryphy

ok sounds pretty easy. how do you want the images displayed on the page? in a table?

Member Avatar for cereal
0
3K
Member Avatar for floatingDivs

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

Member Avatar for diafol
0
111
Member Avatar for php2sheik
Member Avatar for Sudhir_1
0
376
Member Avatar for ryy705

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]

Member Avatar for pritaeas
0
4K
Member Avatar for adams2887

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 …

Member Avatar for Raju_3
0
733
Member Avatar for elamigosam

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.

Member Avatar for pp0007
-1
322
Member Avatar for gpoo

Not possible without a third party (unless you own your own wireless company with their own network)

Member Avatar for wayneh
0
565
Member Avatar for Hendo
Member Avatar for Hendo
1
232
Member Avatar for rainhider

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.

Member Avatar for raithier
0
201
Member Avatar for JeniF

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?

Member Avatar for caroleesuserid
0
836
Member Avatar for showman13

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.

Member Avatar for pratziyer
0
147
Member Avatar for rm_daniweb

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 …

Member Avatar for talad
0
3K
Member Avatar for majoorpa

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 …

Member Avatar for senthil.nila
0
224
Member Avatar for somedude3488

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 …

Member Avatar for masterdeveloper
2
680
Member Avatar for scorpionz

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]

Member Avatar for rsiljat
0
387
Member Avatar for angelic_devil

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.

Member Avatar for vikramrawale
0
1K
Member Avatar for sillyboy

A playlist of Breaking Benjamin, Stone Sour, Sevendust, Three Days Grace, and some T-Pain to change it up.

Member Avatar for Helianthus
0
5K
Member Avatar for UzuNarU

Date formats of the date() function need to be wrapped in quotes: `$blah = date('m-d-Y');`

Member Avatar for UzuNarU
0
790
Member Avatar for wiliclip

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.

Member Avatar for mmnnbbv
0
2K
Member Avatar for oldezwe
Member Avatar for leoblanc

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.

Member Avatar for leoblanc
0
342
Member Avatar for veledrom

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.

Member Avatar for veledrom
0
124
Member Avatar for cancer10in

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 …

Member Avatar for somedude3488
0
225
Member Avatar for techite

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 …

Member Avatar for diafol
0
155
Member Avatar for veledrom

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.

Member Avatar for veledrom
0
140
Member Avatar for <M/>

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.

Member Avatar for somedude3488
0
224
Member Avatar for cereal

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.

Member Avatar for cereal
1
334
Member Avatar for cjohnweb

Shouldn't `/(?!=` at the beginning be `/(?!`? Not a regular expression expert, but I don't remember the != together. Haven't used lookarounds in awhile.

Member Avatar for cjohnweb
0
407
Member Avatar for davesmith437

Do you have this code online where I can look at the source. Due to formatting issues, the code you posted is very hard to read, which is making it hard to help solve the problem. As an alternative, could you attach the source code?

Member Avatar for davesmith437
0
223
Member Avatar for dualzNZ

There is a typo in the update query inside the while loop. imprssions should be impressions.

Member Avatar for dualzNZ
0
6K
Member Avatar for richlacey

In my experience `is_null` doesn't work for values pulled from a database. MySQL null is not equivelent to PHP null. Null column values come across as an empty string so checking it against an empty string like below should help you out: if ( $row['photo'] !== '' ) { //image …

Member Avatar for richlacey
0
118
Member Avatar for McLaren

I would use the short hand if statement: `$page = ( isset( $_GET['page'] ) && is_numeric( $_GET['page'] ) ? (int) $_GET['page'] : 1 );` to keep it short and not feel dirty.

Member Avatar for cereal
0
325
Member Avatar for arwalters1990

Do you have `session_start();` at the beginning of your script on every page the session data is needed?

Member Avatar for arwalters1990
0
342
Member Avatar for itisnot_me

You are running into scope issues. Variables created in a anonymous function are not available outside the function unless they are defined first outside the function (which defeats the purpose of what you are trying to do). Try this maybe: for( key in map ) { eval('var ' + key …

Member Avatar for itisnot_me
0
202
Member Avatar for veledrom
Member Avatar for phplover
0
165
Member Avatar for julio gomez

Why are you using javascript to redirect? Just use [icode]header('Location: http://somesite.com/page.html');[/icode]. You can use a relative url as well. Make sure you have nothing being echoed to the browser before calling that. If you are still getting an internal server error, post more code because that function will not cause …

Member Avatar for KEN74
0
570
Member Avatar for Inny

No, that does not seem possible. But I might not be understanding your question well enough. To handle hotlinking: The way I have seen this done and actually done myself a few times is to have a php script handle all image requests. You have php check for the referrer …

Member Avatar for Inny
0
118
Member Avatar for minitauros

I have ran into this problem and I solve it by using php to handle this. Pretty much you send the entire url to a php page in a url variable. Ex. [code] RewriteRule ^(.*)$ your_page.php?_url_=$1 [/code] Then with php you get the data and parse it yourself. [code] if …

Member Avatar for cwarn23
0
301
Member Avatar for jonesa01

This is a regular expression that will match the 111 (111) 1112 number in the string. You can modify it to work with others. [code] $string = 'Phone 111 (111) 1112 to get this for 75% off - Call Now. Offer open to 5pm only full price after 5.'; if …

Member Avatar for jonesa01
1
4K
Member Avatar for -==Zero==-

To do this in a simple manner: [code=php] if ( isset( $_GET['letter'] ) ) { $query = mysql_query("SELECT `name` FROM `users` WHERE `name` LIKE '" . mysql_real_escape_string( strtoupper( $_GET['letter'] ) ) . "%'"); //do what you want with query result } [/code]

Member Avatar for -==Zero==-
0
153
Member Avatar for ajbest

Cookies cannot be used for security purposes like you mentioned. Those are out of the question. Why can't these sites just be subdomains of the same domain? This would solve your problem. The only way to really do this is with the url. This is really insecure, but there are …

Member Avatar for ajbest
0
215
Member Avatar for Simon180

I would do this: [code=php] $query = mysql_query('SELECT `email`,COUNT(`email`) AS `count` FROM `table` GROUP BY `email`'); if ( mysql_num_rows( $query ) > 0 ) { while( list( $email,$count ) = mysql_fetch_row( $query ) ) { echo "{$email} has {$count} occurrences<br />"; } } [/code]

Member Avatar for Simon180
0
113
Member Avatar for wimmer

[code] RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^example6/([^/]+)$ example6.php?id=$1 [L] [/code] Does that work? Haven't tested it so I might of forgotten something. Just wrote it from memory.

Member Avatar for somedude3488
0
224
Member Avatar for emiola

Remove the error suppression (@) from the mail function on line 98. After this, run a test and see if you get any errors. If the above didn't help, try putting this at the top of your code: [code=php] error_reporting(-1); ini_set('display_errors','On'); [/code] and let us know what comes up.

Member Avatar for somedude3488
0
271
Member Avatar for Buppy

I would store just an id in the session. Storing info in a session causes some problems, especially when debugging. For example you store the users information in a session, but they update it. Now you have to modify the session and the database. This next example comes from a …

Member Avatar for somedude3488
0
133
Member Avatar for Smurf_UK
Member Avatar for Morta
0
3K
Member Avatar for jeffc418

session_register and session_is_registered are depreciated. use the $_SESSION array instead. md5 isn't secure anymore. you should use something like sha1 with a random salt.

Member Avatar for bjlotus
0
2K
Member Avatar for fatihpiristine

The End.