408 Posted Topics

Member Avatar for pranay1995

get rid of the ' ' around $checkUsername There should only be 1 result if the user/pass combo exists. No one will have the same username, right? So change line 20 to: if($Username_exists == 1) { header("Location: indexma.php"); exit();//all header redirects need to kill the script or it will continue …

Member Avatar for pranay1995
0
209
Member Avatar for kshahnazari

This is, by far, my favorite site for regex testing. Make sure you use the Preg radio button, and have fun: http://www.regextester.com/

Member Avatar for ryantroop
0
141
Member Avatar for vizz

You need to combine PHP and HTML tables and CSS, and figure it out. PHP has wonderful Date() functions. Check them out! http://php.net/manual/en/function.date.php

Member Avatar for vizz
0
97
Member Avatar for flynismo

Try hard coding session_start() as the first thing on each page, and not as part of the include. If you are redirecting, you may have to session_write_close() before the header change. It may be something to do with the way you are accessing variables, as well. As a last bit, …

Member Avatar for flynismo
0
316
Member Avatar for yup790

Best way to learn any programming language - find something you are interested in, see what you can do to become involved. Like photography? Make a program that sorts images by name or, for more fun, common pixel hot spots (like, pictures that have over 2000 pixels that are red …

Member Avatar for JamesCherrill
0
203
Member Avatar for iamthwee

There are also ways to obfuscate the salt, by storing it outside the html/ftp root, and telling php where to look with includes. On top of that, the salt could be appended to the front or back of the password, making it a bit harder to rainbow hack the passwords, …

Member Avatar for LastMitch
0
232
Member Avatar for MDanz

If I understand the manual right, the crypt function is based on the box running PHP, not PHP itself. If they are on different computers, you are likely to get different results. Anyone know for sure?

Member Avatar for ryantroop
0
93
Member Avatar for Ulfang
Member Avatar for Ulfang
0
245
Member Avatar for andyy121

Line 2 of your php script is asking to include a file called "funck.inc.php" Assuming you wrote this yourself, you may have meant to do include("funck.inc") or, alternatively, include("funck.php") Whatever it is, the error message is saying that the file you are asking to include does not exist. Find the …

Member Avatar for andyy121
0
311
Member Avatar for Nirmeen Ased

You can make a website about anything, especially academically. Make a page about cats, and how different cats make dogs bark differently. You are proving functionality, concepts, and reiterating all the things you have learned in your class. Content, for the most part, is secondary. PHP is about making frames, …

Member Avatar for ryantroop
-1
148
Member Avatar for ryantroop

So, maybe this is a concept out of the domain of programming... but I think not. Lets say we have a 400MB video file that we want to either send somewhere, or stream. Can we use python to break it into binary, break the binary into chunks, and then send …

Member Avatar for hughesadam_87
0
186
Member Avatar for ryantroop

Are there any open source/free to use, commonly updated... either dumps or APIs that will let someone have zip codes and addresses validated? Think monster.com or careerbuilder.com's location search, or something similar. Thanks Ryan

Member Avatar for Mike_H
0
173
Member Avatar for Jacklittle01

Probably the simplest way to make it a .bat is to make an exe that will write a .bat, execute the .bat, then delete the .bat. In short, if you plan on distributing in windows, make it an exe. py2exe is the standard from what I understand. Your other options …

Member Avatar for Alice25
0
3K
Member Avatar for duyencaothi

I cant suggest O'Reilly's python course enough. It is broken down into 4 courses, and you have a mentor who is very professional and knowledgable the whole way. It is self paced, and the projects are relevant and usable after you are done with the class (and, as a perk, …

Member Avatar for Max00355
0
179
Member Avatar for ryantroop

Which module would I look into to capture things like disc read/write speed, as well as possibly capture what the disk is reading/writing at the time. I would like to make a diagnostic module to check if my disc speed is taking a hit, as I rebuilt a PC and …

Member Avatar for ryantroop
0
99
Member Avatar for ryantroop

I have taken up the Python Challenge and I am stuck on challenge 6, which requires PIL - and sadly I am using 3.2 and there is no PIL support. Yes, alternatively I could simply download 2.7. However, I know there are some differences between 2.x and 3.x and I …

Member Avatar for ryantroop
0
162
Member Avatar for persianprez

I think what youre asking is for this: This is assuming your text document is split by "." as you have above, so... Joe Cren(.)Ryan Troop(.)Eddie Vedder(.)Led Zepplin(.) //or something similar if you do: $array = explode("(.)", fread($fp, filesize($filename))); //this array is populated ['Joe Cren', 'Ryan Troop', 'Eddie Vedder', 'Led …

Member Avatar for Atli
0
1K
Member Avatar for JRCharlie

I love eclipse with the PHP extension. If you are looking for a testing platform, you will not find many good ones (and quite frankly, you are more than likely using the language wrong). Best platform to test - get a cheap/free web host, turn on error reporting, use eclipse …

Member Avatar for JRCharlie
0
259
Member Avatar for kuchi

There is this example on Daniweb: http://www.daniweb.com/software-development/python/threads/22312/get-posted-form-data-in-python Hope I don't get in trouble for sharing a stackoverflow link: http://stackoverflow.com/a/11353284/1481486 There are some other fine examples of how to use python on the web there, as well. All depends on how you plan on using the data, and how you want …

Member Avatar for ryantroop
0
119
Member Avatar for bLuEmEzzy

using select you are not affecting any rows. You should use mysql_num_rows() on line 22 instead, and you want it == 1 (because each username should only have 1 assciated password, and if you are getting more than 1 you're in trouble. Also, sanitize your variables (learn about [mysql_real_escape_string()](http://php.net/manual/en/function.mysql-real-escape-string.php))

Member Avatar for bLuEmEzzy
0
3K
Member Avatar for smackthat9876

Im not sure why you want to redirect away from your site 80% of the time, as that would pretty much ensure 80% of the people would not want to visit your site because it's useless. However, if you wish to pursue this you have 2 options. 1 - pure …

Member Avatar for smackthat9876
0
1K
Member Avatar for ryantroop

Can we possibly get a checkbox, or an optional write in so we can know why our posts are voted down? Some of them seem so random, it would just be nice to know why they are voted down. I like coming here to try and help, and it's not …

Member Avatar for Dani
0
162
Member Avatar for ryantroop

Anyone know any good online.. I guess.. challenges or tutorials that will teach the fundamentals of the automated QA process using Python? Is it simply TDD? Or is there more to it? If it is TDD, can anyone suggest where to practice this more, other than "come up with a …

Member Avatar for ryantroop
-1
130
Member Avatar for sarelnet

So this was a fun exercise for me... I think this should get you at least started... import sys import re import os try: #open our document and read it as a string doc = open(os.path.abspath(sys.argv[1]), 'r').read() #declare and compile our pattern as raw string regex = r'<!--content-->' reg = …

Member Avatar for ryantroop
0
253
Member Avatar for jeffc418

I would think that the google suggestion for search is based off a custom dictionary, and if an item is not in the dictionary it offers the closest match as a suggestion. What the closest match is will depend on your algorithm. Also, google has been mining search queries, and …

Member Avatar for jeffc418
0
143
Member Avatar for ryantroop

So, in an exercise in futility, I decided to write a script that will take either a file or a string and find patterns in the words, and display the results for a nice friendly human use. Right now, it simply searches forwards and backwards(ish), but Im wondering if there …

Member Avatar for TrustyTony
0
155
Member Avatar for rev_ollie

because of this very awkward (to me) behavior, I much prefer .format() you could easily have done: `cursor.execute("""INSERT INTO staff (FIRST_NAME, LAST_NAME) VALUES (r{}, r{})""".format(first_name, second_name)` You can even format by place holder, if you have a list, tuple, or parsed dictionary: names = ['firstname', 'lastname'] cursor.execute("""INSERT INTO staff (FIRST_NAME, …

Member Avatar for rev_ollie
0
8K
Member Avatar for LastMitch
Member Avatar for latooplat

If you're going to be salting the password, salt it using a stored global in .htaccess http://www.besthostratings.com/articles/php-variables-htaccess.html Or from an include that is stored above http access. This makes a private salt that can only be accesed with root FTP access. On top of that, your added "pepper" should be …

Member Avatar for ryantroop
0
414
Member Avatar for violaceous

I would recommend you turn off all your error suppressions (@) and see if you raise any errors... Line 1 is missing a closing ; While I can't say it's improper, I have never seen a while loop in PHP using while($mycontingency): ... endwhile; I would encourage you to use …

Member Avatar for violaceous
0
132
Member Avatar for nova37

never trust your users. End of story. At the very minimum, $keyword = mysql_real_escape_string($keyword); should be used. With the limited code you have given, it's difficult to say. Without knowing how $siteurl is populated, or how $url3 is populated, it's difficult to see where you are failing.

Member Avatar for gabrielcastillo
0
216
Member Avatar for devianleong

looks like a spelling/case error with your DB columns. As above, make sure that 'ID' is the actual name of the column, and not something like 'userID' or something similar. You don't need to stripslashes if you're using real_escape_string(). Don't give idiots who try to hack your page more room …

Member Avatar for phorce
0
132
Member Avatar for Frensi

So first, Robot is not a defined variable anywhere, so Robot.population means nothing. Second, the way you are using population wont work. Every time you make a new robot, the population will reset to 0, and only that robot will have a population of 0. You will need to rethink …

Member Avatar for Gribouillis
0
310
Member Avatar for jadzrev13

Erm.. all isntances of mysql_numrows should be mysql_num_rows() <-notice the extra underscore Line 50, 85, 113, 126, 164.... that should get you started... I saw a few more below it, as well.. 184, 197... there's more.

Member Avatar for ryantroop
0
341
Member Avatar for DrPepper8412

$uploadResponse = "File Upload Complete!<br /> The file has been saved as Â¥".$_REQUEST['listname']."Â¥ and will be displayed as Â¥".$listnameNice."Â¥<br /><br />"; proper formatting for concatenation is: $var = "my string starts here and I will only use one quote to break it ".$add_this_var." and now I can continue with my …

Member Avatar for Morta
0
360
Member Avatar for monica.slocum

Assuming your form has the names right from the HTML submitting page... try capitalizing POST so $_POST['gt'] Im pretty sure globals are case sensitive.

Member Avatar for ryantroop
0
143
Member Avatar for ryantroop

So, I would like to start working on a python module to support RFC 2326 (RTSP), in an effort to work on a larger application that I will probably need help with later. I am unsure how to go about making software that is meant to adhere to a specific …

Member Avatar for ryantroop
0
278
Member Avatar for HasNor
Member Avatar for ryantroop
0
171
Member Avatar for laetitia--

the proper syntax for else is: else { ... } <- you need open and closing brackets just like an if statement.

Member Avatar for ryantroop
0
1K
Member Avatar for showman13
Member Avatar for showman13
0
107
Member Avatar for Stardemos

Ugh.. lets try again.. just did a long explanation, hit delete, and I lost the page... fun fun... I shall shorten it... iterate over your post instead of calling them directly... mysql_connect('localhost', 'foo', 'bar'); $expected = array('check', 'lote', 'val' ....); $inserts = array(); foreach($_POST as $key => $value) { if(in_array($key, …

Member Avatar for Stardemos
0
513
Member Avatar for saadi06
Member Avatar for LastMitch

You would do well to understand what SESSIONS are COOKIES are, and how to use them. Basically, as you are using them, a permission file is a php page that can be accessed when the user is logged in, and their session data is available to the server. Sessions are …

Member Avatar for zexlover.deeppassions
0
219
Member Avatar for erik216

get rid of the concatenation... mysql_query("UPDATE member_info SET tel='33333339' where id='$update_id';"); You can do inline variables, as long as you are using " " instead of ' '. In your particular case, however, it looks like you have double quotes twice at the end of your statement, which basically ruins …

Member Avatar for ryantroop
0
128
Member Avatar for Mahesh57

In all honesty, I would like to know how to simply begin with a project like this... Im still rather new to Python and I read all over the place "Python is GREAT for prototyping!" And then fails to expand on that... Perhaps it is my lack of experience with …

Member Avatar for Gribouillis
0
395
Member Avatar for GerryL417

Most (if not all) email systems will ignore PHP (it has no meaning to the mail protocol), and JavaScript, as far as I know, will not transfer over through email. You would have to click links and go to pages and interact with the malicious page. It sounds like you …

Member Avatar for <M/>
-1
130
Member Avatar for vizz

unless you're talking about country codes, in which case you need to register your domain with a country code (there are probably some limitations.. like.. you have to find a server in that country to host your data) Like, in your example, co.nz would be new zeland http://www.godaddy.com/domains/searchresults.aspx?ci=54814 (assuming their …

Member Avatar for ryantroop
0
125
Member Avatar for ryantroop

Having a little trouble getting my "pre-loader" to show properly... I would assume, what this script would do is that once xmlhttp is invoked, JS would make a div with an ID called 'preload' and it will persist until we get a 400 response from the server, and then destroy …

Member Avatar for Taywin
0
142
Member Avatar for kuchi

If you want the field name directly, simply don't use an alias. By defining FIRST_NAME as NAME you are asking to return "NAME" with the contents (the alias is there to lessen the amount we have to type). If you don't want them, dont use them. If that wasnt clear, …

Member Avatar for ryantroop
0
210
Member Avatar for ryantroop

Hey all, Im hoping this isnt too out of line to ask - it is genuinely out of a desire to learn and improve, but sadly it is not necessarily code based. I am working on getting "experience" so I can persue a career in programming, either web, platform, or …

Member Avatar for JorgeM
0
251

The End.