Archive for August, 2009
I,m having a little problem understanding a small line in a php program?
hi
i,m not a programmer and i,m new to programing and design, i have been using dw cs3 and when i do something i look at the codes and try to understand whats going on, i recently got a dwcs3 extension, which is called smart e-mailer, and to make it work i have to change the code and introduce a user name and password, which is no problem. but then i,m instructed to change a line which is listed as " Yoursession", i have add the code below for you too see,
$_SESSION['UserSession'] = "youruserid"; // customize your UserId
$_SESSION['PassSession'] = "yourpass"; // customize your Password
if (isset($_POST['send'])) {
if ($_POST['UserID'] == $_SESSION['UserSession'] && $_POST['Password'] == $_SESSION['PassSession']) {
$SessionPassword = "yoursession"; // customize the accessing session
session_register("SessionPassword");
header("Location: SmarteMailManagerPro.php");
} else {
header("Location: error.php");
the line i,m confused about is $SessionPassword = "yoursession"; // customize the accessing session,
i,m not sure what this means what would i change "yoursession" too.
i have tryed too add the password i inserted into the database, obviously i,m doing something wrong , can anyone advise me,
Thank you
G,M
I don’t think it matters what you put in there. You just have to make sure you use that password throughout the site anywhere it checks your session to make sure your allowed to be there. Using a random string is good for this so its difficult to hack in by guessing what it is.
PHP Tutorial #1 - Syntax
Remember this video has been uploaded in full HD, 1280X720! If you have a good internet connection please view in HD for better viewing.
This is the first video of many. In this lesson we will show you the very basic of PHP, Syntax.
A short overview about what is talked about in the video:
-PHP code tags, starting and ending a PHP script.
-All commands and lines executed must end in a semi colon ;
Thank you for watching.
P.S: You can now see this tutorial on the XCodec Official gallery, http://gallery.thexcodec.com
Duration : 0:0:39
C Programming Tutorial 3- Strings and Char Data Type in C: Game Programming Series: Part 1
This is part I of a two part video.
The C Programming language is a great place to start for anyone who would like to learn computer programming. C is relatively easy to learn but can be very powerful While its a much older language and not object oriented, it can be used to develop almost any type of application– including video games. The C programming language has been used in colleges and universities for years and continues to be used all over the world.
This series will continue through the basics of C programming and teach C for the creation of simple video games. The Gameboy Advance platform will be used later in the course.
To do this tutorial yourself you’ll need to download a C compiler and editor. LearnToProgram.TV recommends Dev C++ by Bloodshed.
This third C Programming Tutorial Video will show you how to use the char data type, get input from the user and use strings. In addition two string functions are discussed.
Mark Lassoff, of LearnToProgram.TV hosts the program. Lassoff is a professional programming trainer and has been in the field for ten years. For more information and videos, please visit www.LearnToProgram.TV.
Duration : 0:9:20
PHP Tutorials: Creating a Guestbook (Part 2)
Create your own guestbook using PHP and a MySQL database.
Duration : 0:10:0
How would it take me to learn PHP programming?
i decided to learn it on my on pace..how long it would take me? im alocating myselt for at least 2 yrs..is it enough?
It should take you about 6 months to learn programming. Then another few months to learn object oriented programming. Then PHP syntax is kind of trivial - work with the help file open. To get really good at it? Maybe 2 or 3 years of actually doing it 40 hours a week. But 2 years is more than enough time to go from "what’s programming?" to being able to see at least some of the PHP code in your mind when you know what you want the page to do.
Start learning programming with http://www-old.oberon.ethz.ch/WirthPubl/AD.pdf (it’s a pdf file, it’s free and it’s about the best programming course ever written. Expect to spend at least a few months on it.)
Php Web Development: Advanced Programming Technique
Personal home page or hypertext preprocessor or PHP as it is popularly known as, is a programming language which is designed to produce dynamic web pages that interacts with databases. PHP is generally an HTML-embedded scripting language which is designed to develop home pages for the websites.
PHP was developed by Rasmus Lerdorf in 1994 as personal home page, widely used scripting language that designed for developing web applications. The purpose was to increase the efficiency and suitability for the same. Web pages in PHP are treated same as the regular HTML pages, the edits and updates can be done in the same way as in simply created HTML pages. When the page is opened by a visitor, the PHP commands are processed by the server and then send to the visitor’s browser as a result. It is an open Source and cross-platform technique which runs on Windows NT and other UNIX versions.
Today, among all server side scripting languages, PHP is frequently used to create dynamic pages as it is easy, fast, secure, open source and stable. For programmers who have a good knowledge of languages such as C, JavaScript and html, PHP seems to be very easy to learn and understand. Also it feels very comfortable to learn PHP if a person have some idea about C and Perl.
PHP consists of an important feature called connective abilities. In this feature, it can interface with a variety of libraries such as graphics, XML, encryption, etc. using a modular system of extensions. PHP includes numerous servers and database interfaces which make it easier, faster and reliable.. It can load into severs like Apache, IIS, Roxen, THTTPD and AOL server and databases like MySQL, MS SQL, Informix, Oracle etc. ODBC is also an option if there is some problem with interfaces and databases.
In all, PHP offers huge advantages which help programmers to use this advanced programming technique including easy integration with web pages. PHP interfaces mostly work well with one of the most popular online database called MySQL .To automate the web sites, PHP and MySQL is the best choice than ever.
Caffeinated Content
Php Programming: An Intelligent Choice For Your Website Success
PHP means Hypertext Preprocessor Programming; it is basically script based and server side programming language. Server side means the scripts will be in to the HTML but server processes on it first before sending that applications to browsers. You can not see PHP coding in source of that particular web page because the code is not visible, it only gives output. PHP is used to create dynamic web pages for internet business.
Some features of PHP:
• PHP is very helpful in content management system
• PHP can be used for command line scripting
• It can be used in relational database management systems
• Provides design structure to promote rapid application development
• It allows developers to write extensions in C
• It can be used in all major operating systems including Linux, Microsoft Windows and RISC OS
• It permits users to transfer specific files from their client computers to a web server
• It is flexible in database connectivity
In web development era PHP adds more functionality to your website, it allows your website visitors to interact with you through scripts.
PHP development services have many advantages like low cost and high performance. The other advantage is that the code is simple and easy to understand. PHP is widely used for frameworks and to design a structure. PHP is mainly used for the small business with limited budget.
There are lots of service providers in India who provide outsourcing PHP programming services with highly qualified and skilled IT professional. They are providing best services at affordable rate and always ready to fulfill all your requirements. If you’re getting good service provider then you can fulfill all your requirements and you can also earn long profit form that because the future of PHP is very amazing.
Website content
Wise Choices in PHP Programming
If you have been browsing the web foir quite sometime, then you might have come across cookies which allows your browser to remember passwords and other information that may have anything to do with your actions on a particular website. These can be preferences that would allow the browser or webpage on the browser to determine your habits online allowing it to perform the requested operations faster and easier. A cookie is called a client-based information for it is stored on the client computer (yours when you browse the web) and is taken or stored intact along with all the information it contains for a specified amount of time or till you delete your browsing history and cookies. If you have come across tracking cookies, these are information that defines you to a particular web page which is called upon on your next visit. When creating cookies with your page, there are specific parameters (cookies by the way are created using user-made code in PHP) that must be remembered so as not to fill up the hard disks of your client computers as they visit your website page again and again. The function setcookie is used with the following syntax:
setcookie(var1, var2, time)
The var 1 stands for the name of the cookie you are creating, with the var 2 containing the value of the said cookie and the last parameter is the time which specifies the amount of time it takes for the function to kill (terminate/delete) the cookie. A more defined and elaborate explanation of the function can be found on this page.
There are a lot of programmers who share code and sample applications which you can use for free (provided you clear it up first) but for budding programmers, they’re all there for the taking. Sites like http://websitetips.com, http://Smartwebby.com and many other blogs and help sites allows access to tips from programmers like you making it a pleasant experience altogether. Can’t find a question, post questions to the many forums and you’ll get help from others in no time, you might even get help from the guru’s themselves who made the phenomenon that is PHP possible for all of us to use.
Thanks to the basic foundation on which PHP is founded on, the language being free of all legalities and other stuff that makes deployment of other languages on the many platforms quite expensive. But the many people who makeup the PHP community are not ones who keep knowledge to themselves for there are tons of free pre-made templates for applications and processes on the web available for programmers from all skill levels. They make it fun and easy to learn the language in no time and the community fosters growth to all of those who benefit from the use of PHP. Search online for help and you will surely get it in the form of forums and other helpful articles.
As stated in the previous entry, shortening or simplifying your source code makes it easier and better when you need to find bugs and a good example of this would be :
Example :
if ($Mickey == true) echo ‘Welcome to the Mickey Mouse Club House’;
elseif ($MainCharacter == false) echo ‘Hi Barney!’;
Making things a bit simpler, say by taking away the ‘==’ and ‘!=’ gives you;
if ($Mickey) echo ‘Welcome to the Mickey Mouse Club House.’;
elseif (!$MainCharacter) echo ‘Hi Barney!’;
Simplifying code should be the aim of each and every programmer (who’s head aches when you get some bugs you got to fix) so you get to code less and better than the other guy. Remember, we’re all on the same plane using the same free language so we should be helping others for the better.
Website content
Why does a html form variable posting gets truncated on a php receive ?
I have a HTML form which send a variable to my server side php code via a javascript ajax function. like
var url = "search.php" + "?strsrch=" + s + "&choice=" + c;
var mygetrequest = ajaxRequest(url);
The problem is when the variable s or c contains a # in between, the php program truncates the string on that #. Is that something normal in php ? I can not understand the situation, I am not a very experienced coder of php though.
Thanks for any help in advance.
That’s because you didn’t escape your strings. Any special character will mess it up.
var url = "search.php" + "?strsrch=" + escape(s) + "&choice=" + escape(c);
(Imagine what would happen if s was "test&hackvar=13" and you didn’t escape it. It would result in a new variable being injected into your url)
Get FREE 7 - http://TheSGRProgram.com/special.php?a_id=14340
MWUnlimited - Receive 7 Free Lessons on the Law of Attraction at
http://thesgrprogram.com/special.php?a_id=14340
Some of the featured teachers in the movie ” The Secret ” have put together a program to help each and every one of us manifest into our lives on the 3rd Dimension the people, places, and things which we desire for the highest good of all concerned. If you’re not living a life filled with your own unique and personal passion, take a look and get started today! For Free Downloads of .pdf e-books by Wallace Wattles, the man who inspired Rhonda Byrne, the creator of the DVD Video Movie ” The Secret “, just stop by
http://www.MWUnlimited.com
Thank You!
Duration : 0:3:59


