Urgent - Help with PHP/ASP Code

Okat this one is going to be complicated i assume. I am a webdesigner, iv been working since 1998 and my sites have amazingly increased alot since then, i now have (finally) photoshop fully under my control. I can complete a full site with design, pages, content and graphics, complete in 3 days (inc while working a 9-5 job).

The only problem i am now getting is all my clients want php login, as of late iv been using Cute news, which is good and is a amazing free script to use. But as im sure you could imagine its about time that i really got to learning the new ideas and methods of doing websites.

What i am looking for is HOW to create login and password panels (not a clue at the moment), then that page will go to the secure area where with forms, you can add news, easy and fast. I really REALLY need to understand this withing if possible the next 2 months as i have a rather large project that would profit amazingly from this.

I know this is a really bitch of a question so i dont expect a full written explanation (but anyone who went into amazing detail would get instantly ALOT MORE points ie. 100, i would do a free romaing thread so u can accept points). I would like something LIKE :

Links to tutorials and guides that are easy to understand and get used to,
Good descriptions of what is needed and where to get it from,
Just a all round explanation and some sort of guide that will get me on the tracks to getting good.

I hope im not asking for too much, thanking you in advance - Reece Warrender
wo33erAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Timbo87Connect With a Mentor Commented:
Unless you are hosting the final product, it's a safe bet to assume that a lot of your clients will be using an Apache web server with PHP. This site from Zend (owners of PHP) has about everything there is to know about PHP user authentication with various backends, including flat files, .htaccess, and full blown databases.
http://www.zend.com/zend/tut/authentication.php

I don't know of any good ASP sites off the top of my head, but this tackles user authentication in ASP.NET.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT03.asp

A word of caution though, user authentication and protected content adds a whole new dimension to a web application and should not added at the last minute or in a rush. Make sure you have a thorough understanding of how it works, how to protect against malicious users, and how to write secure code before you start writing the actual code, and most definitely before you ship the final product.
0
 
kssaranConnect With a Mentor Commented:
Well. Reece,

From the look of it, your application is not going to be very simple. Creating Login & password pannels can be done with a simple database usermaster and verifying it against the user's login. When you talk of Secured area, that means you might probably have to buy a Digital Certificate from any one secure certificite issuer like www.verisign.com or somebody and you need to make use of protocal HTTPS instead of HTTP. Time frame can be defined depends on the exact amount of work involved. Is it just only the adding of news, you can definitely finish the whole thing in a month period.

Here are few articles about getting a digital certificate for your secured server
http://www.redhat.com/docs/manuals/linux/RHL-7-Manual/ref-guide/ch-securing.html
https://www.verisign.com/support/site/caReplacement.html

Pls get back for any further queries

Rgds
Sara
0
 
Timbo87Commented:
One thing I want to clear up. If you want a secure site, as in users submitting credit card information, then yes, you'll need to get a certificate like Sara said, but if you mean secure as in the average Joe not being able to access it and just members, then the links I provided above cover it.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
kssaranCommented:
Tks 4 adding ur comment Timbo, hmmm, cannot really that itz only for credit card information submission. let us say if the News is highly confidential n they dont want it to be decrypted on the way of itz request, for such scenarios also it is recommended to have a secured site. itz all depends on the clients need. Anyway let Reece decide abt that.

Rgds
Sara
0
 
swarnajyothirmayi123Connect With a Mentor Commented:
Since you said you are a web designer, most probably are you using Dreamweaver MX 2004. It can be used for programming for designers since it adds all the code for you. It works for php, asp, asp.net.

If you want to learn asp.net it is quite easy, you can download the asp.net quick start tutorials. Before that you have to learn the programming basics for the language you are going to learn.

Basically it is only the syntax you have to become familiar with.
Programming in any language will use datatypes(string, integer etc whether the variable will store a string or number etc), loops (while, for , if , select case etc), functions and procedures etc. You learn these basics and then start with simple programming like the login page and user registration page. When you complete these you will have basic understanding of how dynamic sites work. Also in your way you will learn to use database queries to query the database for inserting, updating and deleting data. Sql queries are quite easy for simple work and these queries are like pure english where u can understand by looking at the query what is being done.
eg.
select username, password from users where username='swarna' and password='08067977';
update users set password='2334343' where username='swarna';
etc

And for tutorials, just google for the tutorials you want to learn .(ASP tutorials, PHP tutorials etc)

I think you said you want secure site, are u telling that u will be using a login page by giving your username and password and then you go to the admin page and then you can access the add news content page. If that is your requirement, you can have the usernames and encrypted passwords in database just query the database if the username and password or correct and then allow the user to enter data.

Thanks
Swarna Jyothirmayi Pemmaraju  
0
 
wo33erAuthor Commented:
All i can say is WOW at the responce, well done !. Also im sure iv explained wrong above, security is a issue but i dont really need dedicated security from third parties (ie. no credit card details etc of important).

Instead of the pass and login what i am MORE interested in is how to create forms on a page, where i fill it in. Click 'SUBMIT' and it will then use whatever i wrote in the simple form, and display it on my website in the style that i desire.

The same way that say PHP NUKE and CUTE NEWS works, my personal site is : www.wo33er.com : its not a large site, just for small buissness matters and portfolio.

I found the following link from this site : http://www.w3schools.com/ : which may have what i need, im going to look right away.

If anyone can describe what is needed for a simple :

* Page with a form on it,
* User fills in the form and submits,
* The info wrote in the form is displayed on the say.. news page for example in the desired style wanted (the style of the site obviously).

To learn how to do dynamic php forms which add data into a desired sytle has been a dream of mine for a very long time, and now with summer, i have the time needed to get learning. Any help to get me going would be amazing. Maybe i think im imagining that the whole situation above works alot more complicated than i imagined :(.

THANKS FOR UR HELP SO FAR ! :D - Reece
0
 
wo33erAuthor Commented:
http://www.w3schools.com/php/php_intro.asp - This looks like SPOT ON what i want to learn to be honest.
0
 
wo33erAuthor Commented:
P.S Im new :). Qbasic and Vbasic V begginer is all i know coding whise, i specialise in the design area usually, i would love to be adapt at both.
0
 
wo33erAuthor Commented:
After reading about a bit i think what i need is SQL/MySQL update with php ONLY being a way to show it and lay it out, not acutally perform it. Which is new to me.
0
 
wo33erAuthor Commented:
Ok, its gone quiet :(. But here is what i have done so far :::

<?php
$conn=odbc_connect('Base','','');
$sql="SELECT * FROM Test";
$rs=odbc_exec($conn,$sql);
if (!$rs)
{ exit("Error in SQL");
}
echo "<table width=500 border=0 cellpadding=0 cellspacing=0 align=center>";
echo "<tr><td colspan=4><img src=images/newsbg/news_01.gif></td></tr>";
echo "<tr>";
echo "<td background=images/newsbg/news_02.jpg width=5>&nbsp;</td>";
echo "<td background=images/newsbg/news_03.jpg>Title Name</td>";
echo "<td background=images/newsbg/news_03.jpg>User</td>";
echo "<td background=images/newsbg/news_04.jpg width=5></td>";
echo "</tr>";
while (odbc_fetch_row($rs))
{
$title=odbc_result($rs,"Title");
$user=odbc_result($rs,"User");
$news1=odbc_result($rs,"News1");
echo "<tr>";
echo "<td background=images/newsbg/news_02.jpg width=5>&nbsp;</td>";
echo "<td background=images/newsbg/news_03.jpg>$title</td>";
echo "<td background=images/newsbg/news_03.jpg>$user</td>";
echo "<td background=images/newsbg/news_04.jpg width=5>&nbsp;</td>";
echo "</tr>";
}
echo "<tr>";
echo "<td background=images/newsbg/news_02.jpg width=5>&nbsp;</td>";
echo "<td background=images/newsbg/news_03.jpg colspan=2><br>$news1</td>";
echo "<td background=images/newsbg/news_04.jpg width=5>&nbsp;</td>";
echo "</tr>";
echo "<tr><td colspan=4><img src=images/newsbg/news_05.gif></td></tr>";
echo "</table>";

?>

Its working great :D !. Which im glad, But now i have the biggest problem, :(.

* How do i make it, so that i can ADD to the database from a form page :|.
* How do i make it so after i added, it goes from 'NEWEST FIRST'
* How do i loop the above code so that it will search 'IF NEXT ROW = "" THEN END' sort of idea.

Thanking You In Advance - Reece Warrender
0
 
wo33erAuthor Commented:
Well now im totally lost, i cant understand or work out how to loop so only one row is select and i cant work out even how just to select one row. Maybe i should or started with mySQL, or maybe the difference does not matter. Please help soon :(
0
 
joeposter649Commented:
You can use a "where" clause in your sql to limit what rows are retrieved into the record set.
http://www.w3schools.com/sql/sql_where.asp
0
 
wo33erAuthor Commented:
True, but how :|. I could do it with something like :

SELECT * FROM Test WHERE ID=1

and have in the table this :

ID    NAME                      Date     Description
1     Reece Warremder    Blah      Blah Blah

---

That way it would find the #1 and post that. Thats good, and i will use that for now BUT. I want to be able to ADD from a form on a webpage, without opening the database manually. So how would i get it to work then, as i also want the newest entery to be added first...

something like if statment with a string i assume, i really dont have much of a idea how i will get around this problem, any clues ???.
0
 
joeposter649Connect With a Mentor Commented:

SELECT id,name,description, max(date)
FROM Test
WHERE ID=1
group by id,name
0
 
wo33erAuthor Commented:
Ok i have fixed that problem, i have it all working, now all i need is how to ADD to the database. Anyone ??.
0
 
DMcLambConnect With a Mentor Commented:
mysql_query("INSERT INTO table (fieldname1, fieldname2, fieldname3) VALUES ('$fieldvalue1', '$fieldvalue2', '$fieldvalue')");
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.