Link to home
Start Free TrialLog in
Avatar of wo33er
wo33er

asked on

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
ASKER CERTIFIED SOLUTION
Avatar of Timbo87
Timbo87

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Timbo87
Timbo87

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.
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
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wo33er

ASKER

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
Avatar of wo33er

ASKER

http://www.w3schools.com/php/php_intro.asp - This looks like SPOT ON what i want to learn to be honest.
Avatar of wo33er

ASKER

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.
Avatar of wo33er

ASKER

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.
Avatar of wo33er

ASKER

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
Avatar of wo33er

ASKER

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 :(
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
Avatar of wo33er

ASKER

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 ???.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wo33er

ASKER

Ok i have fixed that problem, i have it all working, now all i need is how to ADD to the database. Anyone ??.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial