708 Posted Topics
Re: To my knowledge, static variables are not inherited. They are only available to that class. | |
Re: 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 ) … | |
Re: where is the php code? the part that actually sends the email | |
Re: do you mean as in sending an email with php with a link in the email? | |
Re: 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] | |
Re: you cannot mix javascript and php. php is server side and javascript is client side. | |
Re: Use [icode]ini_get('register_globals');[/icode] to check for it. | |
Re: Storing the data in a session would be the easiest way to overcome your problem. | |
Re: 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. | |
Re: 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. | |
Re: 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. | |
Re: 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 … | |
Re: 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. | |
Re: 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 … | |
Re: or to keep proper html syntax you could do this: [code] <A href=\"mailto:[email protected]\" target=_top>[email protected]</A> [/code] | |
Re: 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 … | |
Re: 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> … | |
Re: Why not make your own upload class? Thats what I did. Its the best way to make sure it meets all your needs. | |
Re: 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 … | |
Re: Where is $userfinal coming from. It's not defined anywhere. | |
Re: 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 … | |
Re: 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 <? | |
Re: 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. | |
| |
Re: 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. | |
Re: 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. | |
Re: 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. | |
Re: Use either GET or POST. Don't use REQUEST as it has security flaws. | |
Re: 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. … | |
Re: 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. | |
Re: 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]. | |
Re: No one is going to write the code for you. You must try first before receiving help here. | |
Re: 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. | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: Pointless, the cgi and sql classes are not included. The code isn't even xhtml compliant. Why even post this? | |
Re: 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. | |
Re: [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 … | |
Re: 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] | |
Re: 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. | |
Re: It is all the same. The only thing different is the paypal url in the code. | |
The End.