708 Posted Topics

Member Avatar for Virangya
Member Avatar for somedude3488
0
136
Member Avatar for niths

The @ is for error suppression. Its slow and shouldn't be used much. [code] $query = mysql_query("SELECT `status`,`role` FROM `users` WHERE `username` = '" . mysql_real_escape_string( $username ) . "' AND `password` = '" . mysql_real_escape_string( $password ) . "' LIMIT 1"); if ( mysql_num_rows( $query ) == 1 ) …

Member Avatar for somedude3488
0
176
Member Avatar for javan96
Member Avatar for rime
Member Avatar for rstill1
1
11K
Member Avatar for sfrider0

Xan's example should work (except for a few syntax errors). [code] if ( is_array( $_POST['foo'] ) ) { //you should use post for security foreach( $_POST['foo'] as $id ) { if ( is_numeric( $id ) ) { mysql_query("DELETE FROM `table` WHERE `id` = {$id}") or die(mysql_error()); } } } [/code]

Member Avatar for karuppasamy
0
151
Member Avatar for yara1
Member Avatar for ravibose
0
2K
Member Avatar for fatcat2010
Member Avatar for Tekkno

Storing the data in a session would be the easiest way to overcome your problem.

Member Avatar for Tekkno
0
118
Member Avatar for kumiyare

You would need to use the files temp directory to get its data. You cannot read it from their computer. $_FILES['file']['name'] will return the name of the file as it is on their system which doesn't matter once its uploaded. Just replace $_FILES['file']['name'] with $_FILES['file']['tmp_name']. That should work.

Member Avatar for kumiyare
0
98
Member Avatar for MDanz

Take a look at the php manual for array_slice(). In the description you should see where you went wrong. It has to do with the arguments of the function.

Member Avatar for somedude3488
0
86
Member Avatar for MDanz

The best way is to use a keywords table. Then have another table to match a keyword to the proper stack (I am guessing since I don't know your setup). It would take more work but it would be easier to manage.

Member Avatar for somedude3488
0
83
Member Avatar for cwarn23

I did it a while ago, but it used the file system to store messages. To do what you are wanting you would need to use a php socket server and flash. I don't think its possible without those. You might be able to create the socket server and then …

Member Avatar for cwarn23
0
155
Member Avatar for marcmm

you can also use single quotes to surround the text without have to escape the double quotes inside. ex. [code] echo '<a href="delete.php" OnClick="return confirm('blah blah');"> Click here </a>'; [/code] just thought i would point that out.

Member Avatar for akmotta
0
14K
Member Avatar for phpuser

whats kind of funny is that you don't want to use php, but you posted the question in the php forum????? post this in the javascript/ajax forum. i have seen a way to do this but it does require php. another weird thing is that I just noticed is that …

Member Avatar for phpuser
0
98
Member Avatar for jjasoningram

or to keep proper html syntax you could do this: [code] <A href=\"mailto:[email protected]\" target=_top>[email protected]</A> [/code]

Member Avatar for nav33n
0
145
Member Avatar for Stefano Mtangoo

For this to have any merit, it has to be very flexible. The way you are sanitizing the inputs is going to cause a lot of problems for someone trying to add/modify/remove something. The way I would set something like this up would be: Database Class - Handles db connection …

Member Avatar for vjimatjijoro
0
582
Member Avatar for salibaray

This is a crude way to do it. The data isn't formatted properly so you will run into problems when people have the same name. [code=php] <?php $xml =<<<XML <data> <row id="1"> <username>GGR1024</username> <name>Raymond</name> <surname>Saliba</surname> <game>Lotto</game> <won>5000</won> </row> <row id="2"> <username>GGR1111</username> <name>Isabelle</name> <surname>Bonnici</surname> <game>Lotto</game> <won>1000</won> </row> <row id="3"> <username>GGR1024</username> <name>Raymond</name> …

Member Avatar for salibaray
0
187
Member Avatar for mmxbass

Why not make your own upload class? Thats what I did. Its the best way to make sure it meets all your needs.

Member Avatar for mmxbass
0
75
Member Avatar for Venom Rush

This is one of those dilemmas you have to code around. Files uploaded to the tmp directory are usually deleted at the end of script execution. If you are wanting to remember the uploaded file for the next page load (like to show an error message) you are going to …

Member Avatar for Venom Rush
0
62
Member Avatar for DealthRune
Member Avatar for jamied_uk
1
259
Member Avatar for DealthRune

This code is horribly insecure. There are sql injection and xss holes. The code is a mess and very hard to follow. You should add some comments. The way it stands now, I could delete your tables in your database and hijack sessions (there is a lot more I can …

Member Avatar for smartness
0
170
Member Avatar for lydia21

they way you are doing it is pretty much the only way you can pass a variable to the javascript. make sure $groupname is returning a value. also, try using <?php instead of <?

Member Avatar for mehrab
0
281
Member Avatar for forwardlookguy

i don't think it would be hard, but i don't know much about how vin numbers are formatted. is it the same format each time, if so it won't be hard.

Member Avatar for dazm39
-1
2K
Member Avatar for OmniX
Member Avatar for mahgobb

No. I don't read anymore. I haven't read a book since middle school. If a book becomes a movie, I am more inclined to watch it rather than read.

Member Avatar for richman0829
2
203
Member Avatar for cwarn23

Try Debut Video Capture Software. It was free and did more than I expected it too. In the tutorials, make sure you are using proper practices. I don't want to watch them and then see stuff that is wrong.

Member Avatar for cwarn23
4
648
Member Avatar for Zack_G

You would need to run the new string through eval to make the includes work. Use that function with caution though. If you don't use it right there are huge security risks.

Member Avatar for Froger93
0
183
Member Avatar for whitestream6
Member Avatar for verbob
Member Avatar for verbob
0
177
Member Avatar for zhou1919

Use code tags. It really hard to follow your code. There is 0 php in the code you posted. The only reason you are getting the error is because you have short_tags enabled. [code] <?xml version="1.0" encoding="utf-8"?> [/code] causes an error because <? is the opening (short) tag for php. …

Member Avatar for zhou1919
-3
393
Member Avatar for network18

You can't pass url parameters to a php script through cron. If you need to store something to be used in a cronjob later, your best bet would be either to use a database or a text file.

Member Avatar for network18
0
1K
Member Avatar for gotschai

You either need to use eval (which is slow and has security risks if not used properly) or you loop through the array until you get to the index you want. Here is an example. You should find what you are looking for there. [url]http://www.daniweb.com/forums/thread191093.html[/url].

Member Avatar for somedude3488
0
105
Member Avatar for nuki22

No one is going to write the code for you. You must try first before receiving help here.

Member Avatar for somedude3488
0
150
Member Avatar for Namibnat

An associative array is one with named keys. Ex. [code] array( 'name' => 'Name here', 'other' => 'Other data here' ); [/code] In a mysql result, they are the column names.

Member Avatar for somedude3488
0
136
Member Avatar for lifeworks

You need to understand that a salted hash is irreversible (without the original text and salt). Thats the point of it. You either need to generate them a new password and send it to them or give them access to a reset password page on your site. By the reset …

Member Avatar for liamfriel
0
268
Member Avatar for O71v13r

I got bored and wrote code to echo out the actual string. Only took 10 minutes. I ended up getting 21224 not 21124. Maybe I overlooked something. [code] $ones = array( 1 => 'One', 2 => 'Two', 3 => 'Three', 4 => 'Four', 5 => 'Five', 6 => 'Six', 7 …

Member Avatar for somedude3488
1
197
Member Avatar for cwarn23

I use a mixture of both. Kind of. All my calls a centralized around index.php. My url rewrite changes urls like [url]http://www.mysite.com/page/index[/url] to index.php?url=page/index. Then my url class grabs $_GET['url'] and process it. My page class loads the proper page from my php folder hidden above the doc root. That …

Member Avatar for somedude3488
0
101
Member Avatar for mrcniceguy

Here is an email class that I made. I have never had problems with it. It also allows for attachments as well. Example usage: [code] $email = new email; $email->to('[email protected]','[email protected]'); //allows for multiple to addresses //or you can call the to() function again. //carbon copies are allowed using $email->cc('emailaddress'); //blind …

Member Avatar for mrcniceguy
0
178
Member Avatar for genieuk

Using $_SESSION['admin'] would be fine. Its pretty difficult to hijack a session anyway. You have taken the right security measures to prevent that from happening so there isn't much to worry about. Also, never disable a user because of what someone else has done. This can lead to a DOS …

Member Avatar for genieuk
0
132
Member Avatar for Froger93

You have a few options. You can send an instance to each class. Ex. [code] $db = new db; $admin = new admin( $db,$id ); //send the db object to the class [/code] Or use the singleton method. Look this one up as it wouldn't be easy to show you …

Member Avatar for Froger93
0
183
Member Avatar for web3
Member Avatar for dokinah1

Pointless, the cgi and sql classes are not included. The code isn't even xhtml compliant. Why even post this?

Member Avatar for poojamakhija
0
263
Member Avatar for nadnakinam

Did you do any research at all or did you just post the question? There has been numerous threads over this that will tell you the answer. Search for them. Also the php.net manual has the answer as well.

Member Avatar for poojamakhija
0
92
Member Avatar for genieuk

[url]http://php.net/manual/en/function.session-save-path.php[/url] You need specify a new path using an absolute path. It needs to be done on every page before session_start(). It would be pointless to store them inside the public_html as they would be public for everyone to see. That would be a bigger risk than using the default …

Member Avatar for genieuk
0
243
Member Avatar for Boronia
Member Avatar for SuntechWebsites

I know this is a little late, but here is a good registration and login example that is tested and is secure. [url]http://www.daniweb.com/forums/post951182.html#post951182[/url]

Member Avatar for CFROG
-2
123
Member Avatar for angini
Member Avatar for nadnakinam

Put code at the top of page to check and see if the user is still logged in. If not, then you redirect to login page. Its that simple.

Member Avatar for nadnakinam
0
252
Member Avatar for gptArun
Member Avatar for blocblue
-2
221
Member Avatar for lcyew

The End.