Stefano Mtangoo 455 Senior Poster

I have a question
right now I'm writting generic method to clean POST variables. What are necessary thing to sanitize for any text variable? What do I need to do?
Thanks

Stefano Mtangoo 455 Senior Poster

Yep if you want to follow the code, simpla database will be used throughout is done via this

CREATE TABLE `loginsys`.`login` (
`id` INT( 25 ) NOT NULL AUTO_INCREMENT ,
`username` VARCHAR( 25 ) NOT NULL ,
`password` VARCHAR( 100 ) NOT NULL ,
PRIMARY KEY ( `id` )
) ENGINE = MYISAM ;
Stefano Mtangoo 455 Senior Poster

I missed your post
I have tested and it greatly work.
Thanks Priteas. I'm just beginning JQuery thing and I appreciate
Solve!!

Stefano Mtangoo 455 Senior Poster

Ok with this great tutorial I made it!
Thanks for the guy!
One thing, make sure you link JQuery first then your JS file that uses JQuery in that order

Stefano Mtangoo 455 Senior Poster

I see nothing happening
What might be wrong?

Stefano Mtangoo 455 Senior Poster

It seems this one function is ok. The reason I wanted your input on this is because I wanted it to go right. I know it is almost 0.5 of big number but I see it is ok and I will now proceed. No sooner I will start my coding

Thanks

Stefano Mtangoo 455 Senior Poster

Hi all,
I want to add some yellow background when focus turns to text input and remove it when it moves. Here is my code for JQuery

$(document).ready(
	function(){
	 //make form display yellow color when mouse is focused on item
	 $("input").focus( function(){
			$(this).css('background-color' : 'yellow');
		} );//end focus
	
	});

a HTML form

<html>
	<head>
		<title>Login in Site</title>
		<link rel="stylesheet" type="text/css" href="/loginsys/site.css" />
		<script type="text/javascript" src="/loginsys/lib/form.js">	</script>
	</head>

	<body>
	<div id="form">
		<form action="/loginsys/include/login.php" method="POST">
			<p><b>Username:</b> <input type="text" name="usrname" /></p>
			<p><b>Password:</b> <input type="text" name="passwd" /></p>
			<p><input type="submit" value="Login" /></p>
		</form>
	</div>
	</body>

</html>
Stefano Mtangoo 455 Senior Poster

Here is my inc.db.php which contains all database related classes/methods
Should I keep all functions in the same file or separate?

Allright,
I have made only a constructor before I go to login issues please tell me if this is best way to do it if not what do you suggest?

<?php
        //class for db connections and manipulations
	class Connectdb{
		//private values
		private $dbuser="testuser";
		private $dbpass="testpass";
		private $dbhost="localhost";
		private $dbname="testdb";
		
		private function __construct(){
			$conn = mysql_connect($this->dbuser, $this->dbpass , $this->dbhost) or die("Cannot connect to database: Error - ".mysql_error());
			mysql_select_db($this->dbname);
			return $conn;
		}
	
	}
?>
Stefano Mtangoo 455 Senior Poster

As I said,
I would like to make a PHP login /Register system that would be free for anyone. Here I have started. Since Iam not expert, then I will be adding small pieces until something emerges.

I hope DW guys will help until it grows to mature. I want to apply some OOP.

Feel free to criticize and add/remove anything, but state why you did that and explain where you do complex stuffs so that I don't get lost. After it mature I will do host it somewhere (google code or SF)

Thanks

Stefano Mtangoo 455 Senior Poster

Curiously Snack seems to be dead project that supports Python 2.2
Iam I right?

Stefano Mtangoo 455 Senior Poster

Java applets? New also in Java but it sounds like it is what you need
Let experts say something ;)

Stefano Mtangoo 455 Senior Poster

Thanks a lot Paul!
Puzzle is solved

Stefano Mtangoo 455 Senior Poster

That is great app!
I of course recommend it over PyQT for these reasons:
1. Very heavy documentation (You will enjoy using wxWidget Docs too)
2. If you don't care about polish there is great wxGlade for RAD
3. Direct support from the creator (Dunn is one of best supporters of wxPy) plus best wxPythoners here at DW as well as at mailing list (Meeting wxPyers friends like Mike Driscoll, Stef Mientki, Robin Dunn, Andrea Gavana et al is fun)
4. A lot of code snippets
5. Very Liberal Licence (PyQT will not allow you to sell your product if you want to)

The Only thing for now is there is no version for Python 3.1 which isn't a very big deal for me. 2.6 is still very capable.
So there you are!

Stefano Mtangoo 455 Senior Poster

Use wxPython,
It is flexible and beautiful!
Will your Player be opensource? I should say it is great Job! What backend do you use to Play your media? Does it Play videos?

Go for wxPython but so far it is very very very great!

@Snee, I had to zoom to see them

Stefano Mtangoo 455 Senior Poster

check if you added correctly. All paths are separated by semi-colon
C:\Python26\;
If that is okay then check if you typed correctly and lastly if it still fails type full path while in Django directory

C:\Python26\python.exe setup.py install

If this fails too, re-install your python

Stefano Mtangoo 455 Senior Poster

uncompress django and move to the django directory
then type this
python setup.py install

That is all ;)

Stefano Mtangoo 455 Senior Poster

your efforts? You should do something if it means "help". Otherwise google for ready made script if any

Stefano Mtangoo 455 Senior Poster

a sample? I dont understand that. You mean I can add something like wx.TE_RICH is done for text control?

I have to upgrade My Mandriva to use 2.8.10 instead of 9 so as I can use my Demo

Stefano Mtangoo 455 Senior Poster

and In my PDT installed in Aptana, there were no auto completion for MySQL functions. Hope that is fixed now. I have switched to netbeans for now

Stefano Mtangoo 455 Senior Poster

thanks paul, but it seems the child frames have maximize and minimize while AUI have only X button. Am I missing something here?

Stefano Mtangoo 455 Senior Poster

I wonder what is the name of his widget.
It manages wxFrames whose in turn manages wxNoteBooks. It is like wxAUI but its Frames has maximize windows. I wonder what is equivalent wxWidgets/wxPython for this
see here

Thanks

Stefano Mtangoo 455 Senior Poster

are you planning to make a virus ? ;)

Stefano Mtangoo 455 Senior Poster

I will start with SDL_mixer to make media player I have longed to make for long now. Here my question goes. Do I need to know SDL before I can use SDL_MIXER or I can just start directly? and good tutorial for begginner?

Thanks all

Stefano Mtangoo 455 Senior Poster

I have stumbled on how to add Vpython. Is there anyone here who have installed it successful? I get gtkglextmm 1.2 not found even when I have installed it...sad

Also some Demo from wxPython doesn't work. Mandriva repo have 2.8.9 while the latest is 2.8.10 How do I upgrade?

Stefano Mtangoo 455 Senior Poster

can you elaborate a little bit in new bee's terms?
I find Gridbag a little confusing. Java layout is a bit convoluted though ;)

Stefano Mtangoo 455 Senior Poster

Ok apart from above, is this good example to make as "learning platform"?
http://www.evolt.org/PHP-Login-System-with-Admin-Features

Stefano Mtangoo 455 Senior Poster

check wxGridGrid and its brothers. I remember Snee wrote one on wxPython snippet sticky

Stefano Mtangoo 455 Senior Poster

Thanks a lot I will try that on Mandriva 2010

Stefano Mtangoo 455 Senior Poster

Thanks a lot.
I will indeed. Let me start asking for the way to go.
Here is what I see I need to code so far. If I miss something, don't hesitate to point out. Also if there is something that is unnecessary just point out thanks
-------------------------------
1. Register user (Full Name, Email, Username, Password) + Captcha
2. Verify through link sent into email address (Validate)
3. Secure all known attacks in registration process
4. Login user into a system (Username)
5. Secure all known attacks in login process
6. Facility for lost password
7. Secure all known attacks in recovery process

also which is the best way, to have functions in one file or make bunch of classes each for a functionality expressed above?

Thanks!

Stefano Mtangoo 455 Senior Poster

So, according to the doc you have to follow this steps
1. Get content pane
2. Set layout manager for that content pane
3. add components

If so does that mean I have to use many panels for single program that needs many layouts?

Stefano Mtangoo 455 Senior Poster

Thanks Peter!
I'm digging that, and will be back

Stefano Mtangoo 455 Senior Poster

Well I have a localhost which runs django all for testing the site before it is updated to a new release on the web,

but I have a webhost with already django installed. I don't use lamp anymore.

Hello that fascinating me!
How do you setup your server?

Stefano Mtangoo 455 Senior Poster

That is from django coders. it should be, plus docs at site of great help. What I don't like is that they don't provide PDF/Zipped html

Stefano Mtangoo 455 Senior Poster

I read one book which said just take an exe and put it in cgi folder, rename file from .exe to .cgi and that is. Haven't tried though

Stefano Mtangoo 455 Senior Poster

Use Inno setup or nullsoft installer makers. If you have $$ I will say go for installshield
I have tried to pack my software previous with Inno, it is easy!

Stefano Mtangoo 455 Senior Poster

Duh!
As you see DE, is there a posibility for me to produce a login registr system? Why don't we make A daniweb code and go on scrutinizing infinitely? Just start it as a basic system and each one hacking and hacking until it is stable?

Stefano Mtangoo 455 Senior Poster

Please help me to expound how to do layout management. You may choose any layout manager and expound it. I'm doing self teaching most of the time and it is not fun! Please help me ho to arrange.

Also which layout is mostly used

Stefano Mtangoo 455 Senior Poster

I think you should find that functionality in TG rather than using third parties. I hope you will find one

Stefano Mtangoo 455 Senior Poster

Cool, I'll dig. I hope their login system won't be convoluted ;)

Stefano Mtangoo 455 Senior Poster

I use Django which is a well-supported web framework which uses only python.

Do you develop locally or from a server with already configured django? How do you get it work with WAMP/LAMPP?

I supposed he already knew html and python itself, but ofcourse he/she should look at that first.. my bad

No Problem

Stefano Mtangoo 455 Senior Poster

Netbeans, Eclipse, Aptana studio, Codelobster? Have you tried any of these?
I'm yet to find a free satisfying IDE. But at least Aptana studio/Netbeans/Eclipse-PDT

Stefano Mtangoo 455 Senior Poster

post whole code from demo and say which part you want so that someone can guide you on that. I don't even have Python installed here

Stefano Mtangoo 455 Senior Poster

Here then here then here

Stefano Mtangoo 455 Senior Poster

Don't think you can use wxpython with Web. But this is not an absolute answer

Stefano Mtangoo 455 Senior Poster

I installed Apache using drakxwizard and mysql then PhpMyAdmin and all is well now

Stefano Mtangoo 455 Senior Poster

So help me guys,
Which login system is easier to copy so-to-speak, between Joomla, Drupal and Wordpress? Since these have been for so long now, I think thery are stable and secure.

I wonder why there is no Open Source version that is up to date because many people ask for it. When I become expert I will think of writting one ;)

Stefano Mtangoo 455 Senior Poster

Any documentation on Open GL in wxPython?

Stefano Mtangoo 455 Senior Poster

Here is one from vpython docs

from visual import *

floor = box (pos=(0,0,0), length=4, height=0.5, width=4, color=color.blue)
ball = sphere (pos=(0,4,0), radius=1, color=color.red)
ball.velocity = vector(0,-1,0)
dt = 0.01

while 1:
    rate (100)
    ball.pos = ball.pos + ball.velocity*dt
    if ball.y < ball.radius:
        ball.velocity.y = abs(ball.velocity.y)
    else:
        ball.velocity.y = ball.velocity.y - 9.8*dt
Stefano Mtangoo 455 Senior Poster

Here's a question for you.

Do you mean me also? what will you award me as your student ? ;)
Ooh, sorry buddy but show effort so that we would help you where you get stuck.

Stefano Mtangoo 455 Senior Poster

I hope our friend evstevemd will find out how to run versions 2 and 3 of Python selectably from NetBeans.

Nope! I'm not into 3 yet ;)
The Only thing that is hindering me, is a waited wxPython for 3. I have 2.6.4 installed.

Also I haven't decided Yet what to use as Python IDE. Netbeans is good at Java/PHP but I don't like to use it as PyIDE. I think it will be the last option. I still look for another IDE. My Favoriye is always wing but 101 version have no intellisense.

I will go for Wing IDE 101 if all other fails and try NB 6.8 too :)
IF onlly eclipse wasn't resource hunger, Pydev is mature