708 Posted Topics

Member Avatar for Besherek
Member Avatar for jithusdani

You should post this in javascript forum. Anyway, you can't use 'this' in dynamically. The only way I have found that works is if you attach an event and use the target part of the trigger event to get the value you are wanting.

Member Avatar for somedude3488
0
94
Member Avatar for Stefano Mtangoo

Once its deleted it won't be used again (unless you truncate the table). MySQL will not reassign the ids, as it would defeat the purpose of using them. Once you set an id, it should never change.

Member Avatar for Stefano Mtangoo
-1
144
Member Avatar for ENetArch

[QUOTE=ENetArch;1003275]All, Does anyone know if there is a package available to allow PHP programmers to store their PHP Objects / Instances into mySQL, and still allow them to be searchable? ie .. not serialized? Looking forward to your responses, E,[/QUOTE] I don't think so. You have to use serialize to …

Member Avatar for somedude3488
-1
97
Member Avatar for Ghodmode

I use list and explode. [code] list( ,,$value ) = explode( ',','one,two,three,four' ); echo $value; //returns three [/code]

Member Avatar for somedude3488
0
155
Member Avatar for andym67
Member Avatar for click here

Its not great. It just uses a lot of regular expressions and replaces text with php code, writes it to a new file, and executes it. Not very creative, but works.

Member Avatar for click here
0
147
Member Avatar for Renzokouken_22

You most likely had a problem with the file being encoded in UTF-8.  is usually the sign of this. For some reason there is a special character that sometimes is put at the beginning of the file.

Member Avatar for Renzokouken_22
0
242
Member Avatar for Stefano Mtangoo

You access class variables with [icode]$this->var_name[/icode] This is whats causing the error: [code] public function connect($host = $HOST, $user = $USER = "root", $passwd = $PASS, $db = $DATABASE ){ [/code] should be: [code] public function connect($host = $this->HOST, $user = $this->USER = "root", $passwd = $this->PASS, $db = $this->DATABASE …

Member Avatar for Stefano Mtangoo
0
148
Member Avatar for veledrom

On this line: [code] $backupFileName = "Desktop/toy-`date +%d-%m-%Y-%H:%M:%S`.sql"; [/code] You probably are going to need the absolute path to where the file needs to be stored.

Member Avatar for digital-ether
0
196
Member Avatar for dasatti

Don't use * anywhere. Define the columns you need for every query. It will help with performance a little. On your query to get the number of rows for pagination, you are selecting all the data for no reason. Use count(*) it will return a record immediately because mysql caches …

Member Avatar for dasatti
0
148
Member Avatar for mvt6204

[QUOTE=cwarn23;982480]Well I would recommend an advanced system of ajax for best confirmation but if you want to keep it simple the following script will do the job. [CODE=php]$v=get_browser(null,true); $javascript=$v['javascript']; unset($v); if ($javascript) { echo 'Javascript is enabled'; } else { echo 'Javascript is disabled'; }[/CODE][/QUOTE] [icode]get_browser()[/icode] only returns if the …

Member Avatar for CalmQuiet
0
198
Member Avatar for Barefootsanders

This is how I would do it: [code] $lower = true; //if you want lowercase letters $t = 4; $s = 1; while( $s <= $t ) { $i = ( $lower ? 97 : 65 ); while( $i <= ( $lower ? 122 : 90 ) ) { echo …

Member Avatar for Barefootsanders
0
239
Member Avatar for sam023

I wouldn't do that. It would be slower than fetching a few records from a database.

Member Avatar for diafol
0
96
Member Avatar for somedude3488

Got bored and made a function that handles filling strings similar to mysqli bind_param. It actually gets used a lot in my code. Figured someone else might find it useful. Example usage: Using question marks as place holders [code] $str = 'Hello, my daniweb user name is ? and my …

Member Avatar for somedude3488
0
152
Member Avatar for sim_pack

[QUOTE=cwarn23;983269]Even better yet, use javascript to encrypt the passwords before sending it over $_POST. This way if the post data is hacked the data is still encrypted. This sort of hack attack can happen when a hacker attaches a device to a fiberoptic cable to scan data running past. Also …

Member Avatar for almostbob
0
323
Member Avatar for cybershark

This: [code] $total = count($children); [/code] should be: [code] $total = count($children) - 1; [/code]

Member Avatar for cybershark
0
127
Member Avatar for jespin

So pretty much you are storing the image data in the database, right? You have never stated this clearly enough that we understood what you are trying to do.

Member Avatar for diafol
0
279
Member Avatar for Muazam

You are just setting the value to a variable. You should do something like this: [code] foreach( $_GET as $key => $val ) { $_GET[$key] = htmlentities( $val ); } [/code]

Member Avatar for Muazam
0
150
Member Avatar for francis123

Your query would look like this: [code=sql] UPDATE `table` SET `trackdate` = `trackdate` + 1 [/code]

Member Avatar for francis123
0
101
Member Avatar for sarithak

Don't use phpbb. Its not very secure. Look into mybb instead. It is better.

Member Avatar for cwarn23
0
2K
Member Avatar for hooray

I doubt that a null value in the database is the same a null in php. Most likely its returning as a string which can be checked like this: [code] if ( $row['log_check'] == 'NULL' ) { [/code]

Member Avatar for somedude3488
0
140
Member Avatar for becraig

Can you explain your system better? Honestly, I don't see why you need to unset something in the _REQUEST array. There is probably a different way to go about what you are trying to do.

Member Avatar for somedude3488
0
2K
Member Avatar for Schoorsteen

This really has nothing to do with OOP particularly, mostly it has to do with your setup. The way I would do it to minimize queries would be to select all data with users that have that guild id. Then I would pass the user data into the person class …

Member Avatar for Schoorsteen
0
129
Member Avatar for beershits

Sorry to say, but the code you have won't work no matter what you do. PHP is a server-side language and can't interact with client-side easily. You will need to use the _GET method. You define the file you want in the url and then php can read it from …

Member Avatar for almostbob
0
73
Member Avatar for veledrom

Line 9: [code] echo "no"; [/code] is the problem. You can't echo anything to the browser until after headers are sent.

Member Avatar for EvolutionFallen
0
73
Member Avatar for empoor

This line: [code] $fiction_articles = mysql_fetch_assoc($mysql_result1); [/code] is your problem. mysql_fetch_assoc() only returns 1 row.

Member Avatar for empoor
0
154
Member Avatar for sam023

You need to use a template class that will allow for repeatable template sections. That is the proper way to seperate php and html.

Member Avatar for somedude3488
0
98
Member Avatar for daneuchar

You can do: [code] $array = array_filter( explode( '\_1',$charstring ) ); $data = array(); foreach( $array as $part ) { list( $key,$val ) = explode( '=',$part ); $data[$key] = $val; } //edit skill here using $data['SKILL'] = 'something.....'; $array = array(); foreach( $data as $key => $val ) { $array[] …

Member Avatar for daneuchar
0
133
Member Avatar for jonow
Member Avatar for jonow
0
431
Member Avatar for valonesal

You could have a php page on their server request information from a php page on your server with a unique key only assigned to one site. Not sure if thats what you mean.

Member Avatar for valonesal
0
132
Member Avatar for vijaysoft1
Member Avatar for chavansoft
Member Avatar for cwarn23

Good idea, but in practice I fear that it will be very difficult to make and have it work properly. Why not just create a bot that uses premade solutions that can be trusted. It can analyze the words in the question (kind of like what you have) and post …

Member Avatar for cwarn23
1
303
Member Avatar for cwarn23

The easiest way I know is to install the files into the directory where extensions are suppose to be and add the extension to the php.ini file. Worked for my install on a Kubuntu box.

Member Avatar for cwarn23
0
651
Member Avatar for Tekkno

You aren't understanding how an activation script works. As of right now yours makes no sense. The values you are passing via get are not even being used in your queries. The point of an activation script is to send a unique random number that is hard to guess (md5 …

Member Avatar for Tekkno
0
230
Member Avatar for joshmac

change MYSQL_NUM to MYSQL_ASSOC. you are trying to use the names of the fields to get their respective values and its not working because you are getting a numeric array. in the if statement at the end, change the greater than to less than.

Member Avatar for Lantre
0
97
Member Avatar for veledrom

[code] RewriteEngine on # Forces a trailing slash to be added RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$ //this line I don't know about. You might just want to check if a . exists as it would be easier. This is what the Internal Server error is from …

Member Avatar for veledrom
0
86
Member Avatar for gagan22

There is a free thumbshot service created by one of the daniweb members. [url]http://happythumbs.samrudge.co.uk[/url] EDIT: I guess the site is down. Nevermind.

Member Avatar for pritaeas
0
147
Member Avatar for itisnot_me
Member Avatar for itisnot_me
0
79
Member Avatar for mrcniceguy

Thats not sql injection. It's called xss. You need to run the data through the php function htmlentities().

Member Avatar for mrcniceguy
0
299
Member Avatar for DealthRune

You can't have anything echoed to the page before the setcookie call, not even a newline. How hard is it to read the manual? It has the answer to pretty much every question. [url]http://us3.php.net/setcookie[/url] (notice how the description has your answer, it would of taken a minute to find the …

Member Avatar for Josh Connerty
0
344
Member Avatar for dmorrison

You are running mysql_fetch_array only once, which means the code will only be run for one row. Is this what you are wanting? I see that you have queries that update multiple rows based on the value of the first row returned. I am not sure of how the data …

Member Avatar for somedude3488
0
131
Member Avatar for goldy736

What are you using to generate the forms? Just a guess here, but by looking at the formatting you could probably do: [code] $form['submit'] = array('#type' => 'image', '#src'=>'sites/all/themes/MathsLeaderTheme/images/submit_up.gif' ); [/code]

Member Avatar for goldy736
0
271
Member Avatar for shadwickman

<?=...?> is short-hand syntax for echoing data to a page. I personally don't use it, but its pretty common.

Member Avatar for phpbeginners
0
467
Member Avatar for sam023

Please search for information before posting. [url=http://www.google.com/#hl=en&source=hp&q=mysql+vs+mysqli+php&aq=f&aqi=&fp=c9fe100d9e542c1e]Google it first[/url] All the info you need to answer your question can be found via that link.

Member Avatar for somedude3488
0
313
Member Avatar for SgtMash

Look at this again: [code] content="' .$meta_keywords' . "> [/code] You should see the error.

Member Avatar for Airshow
0
91
Member Avatar for NoID

If you have any classes, functions, ect. you need to move them behind the document root (same folder as public_html on most hosts). Then you just included them. You need to add a php.ini file and protect it with .htaccess. This means you put your php configurations in the php.ini …

Member Avatar for cwarn23
0
142
Member Avatar for NoID

Don't use .htaccess to configure php. Thats what a php.ini file is for. That error looks to because by a mysql connection. Check your database credentials. magic_quotes_gpc should be off.

Member Avatar for NoID
0
90
Member Avatar for verbob

You didn't escape the " characters. Example: [code] $property_link = "<a href="listingstest.php?category=property">Property</a>"; [/code] should be [code] $property_link = "<a href=\"listingstest.php?category=property\">Property</a>"; [/code]

Member Avatar for verbob
0
114

The End.