|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Article Discussion: Building a Multi-Page Article System With ASP/PHP
Building a Multi-Page Article System With ASP\/PHP If you have any questions or comments about this article then please post them here.
You can read the article here . |
|
#2
|
|||
|
|||
|
Thanks for this tutorial. It's great!
|
|
#3
|
|||
|
|||
|
no valid HTML
It would help everyone who uses the articles at devarticles.com if authors included valid HTML or XHTML in their examples. Valid code makes better websites. Even better would be to use valid and RECENT versions of HTML or XHTML and CSS instead of using <font> tags and other deprecated code. Not doing so is akin (though not identical) to writing an article for PHP 3.0 users.
If you're unconvinced (or need to brush up) visit webstandards.org. They have all the scoop. Thanks, Steven |
|
#4
|
|||
|
|||
|
Got a couple of errors on the asp version - usually of the object required variety - able to get it to work by doing a set objRS = Server.CreateObject("ADODB.Recordset") or by doing a set objRS = objConn.Execute(strSQL). Also had to include the Replace "'", "''" code since SQL inserts are being used.
Other than that it worked great. Last edited by aspnewbie : January 11th, 2003 at 08:20 AM. |
|
#5
|
|||
|
|||
|
Thanks for the comments guys. I'm well aware of XHTML standards, etc, however that was not the focus of the article. The focus of the article was to show you the fundamentals of building a multi-page CMS, mainly concentrating on the JavaScript and PHP.
However, I've taken your comments on board, and I'll make all future articles "relevant" to standards, etc. |
|
#6
|
|||
|
|||
|
Great article mytch! are you going to finish the article with edit and delete multi-page articles ? or do we have to figure that out?
![]() |
|
#7
|
|||
|
|||
|
First I had to modify the connection for asp also.
I am getting errors when trying to add more articles. I recreated the bd and I was able to add only one article and one part for it. I cannot add more. why? thx. 'db.asp <% Dim strSQLServerName 'Holds the name of the SQL Server Dim strSQLDBUserName 'Holds the user name (for SQL Server Authentication) Dim strSQLDBPassword 'Holds the password (for SQL Server Authentication) Dim strSQLDBName 'Holds name of a database on the server Dim objConn Dim objRS strSQLServerName = "server" 'Holds the name of the SQL Server strSQLDBUserName = "user" 'Holds the user name (for SQL Server Authentication) strSQLDBPassword = "pw" 'Holds the password (for SQL Server Authentication) strSQLDBName = "myCMS" 'Holds name of a database on the server 'SQL Server OLE Driver Set objConn = Server.CreateObject("ADODB.Connection") Set objRS = Server.CreateObject("ADODB.Recordset") objConn.Open "Provider=SQLOLEDB;Server=" & strSQLServerName & ";User ID=" & strSQLDBUserName & ";Password=" & strSQLDBPassword & ";Database=" & strSQLDBName & ";" 'for debug only -adam 'If objConn.errors.count = 0 Then 'Response.Write "Connected OK" 'End If set objRS = Server.CreateObject("ADODB.Recordset") if objConn.Errors.Count > 0 then Response.Write "Couldn't connect to database server" Response.End end if objRS.ActiveConnection = objConn if objConn.Errors.Count > 0 then Response.Write "Couldn't connect to database" Response.End end if %> ![]() |
|
#8
|
|||
|
|||
|
Problem with limit
I did more testing with just "sfsafd" and it seems to work?????
what is the limit for the sections? only a few words? |
|
#9
|
|||
|
|||
|
adammendoza, there is no need to post the same questions multiple times in different threads.
|
|
#10
|
|||
|
|||
|
adammendoza,
Here are my revised versions of the asp code. I also added a drop down list for the authors names (which requires corresponding fields/tables in the db). I put my connection info in an include file instead of on these pages. I was able to add multiple articles and multiple pages. Hope this helps! Last edited by aspnewbie : January 10th, 2003 at 09:41 AM. |
|
#11
|
|||
|
|||
|
Quote:
sorry, it was my first time posting and I put it in the wrong place and then I posted it in the proper place. ![]() |
|
#12
|
|||
|
|||
|
FYI
The file showarticle.php has a wrong hardcoded link in it. Line 20 should be PHP Code:
|
|
#13
|
|||
|
|||
|
Hi, i also have a problem with this. showarticle.php and fullarticle.php are both showing querystrings with no values (eg. http://localhost/fullarticle.php?articleId=). Since im a newb to PHP, i have no idea how to fix this :/
Can somebody help? Thanks |
|
#14
|
|||
|
|||
|
I'm rather new to JavaScript, and just have a few questions about the article.
Why limit the number of pages to twenty? And let's say I have an article with twenty pages, but five main sections. How can I have only the title pages linked to at the bottom of each page? Thanks. |
|
#15
|
|||
|
|||
|
Hey guys... I hate to bring this article up again, but it's really badass... and I love the javascript..
However, the javascript doesn't work in Mozilla... Is it possible you could provide a cross-browser solution? Or break it down so i can create a multi-page system WITHOUT the javascript? -Shade |
|
#16
|
|||
|
|||
|
aloha to everyone
first i have to say: sorry for my bad english but i try everyday to learn more and more of this beautiful language... but now i want to describe my problem... all the code for putting the data into the db and delete them works fine but i canīt find a way to get the pages back to the selectbox to edit the single pages. i could imagin that this is a problem of the java script code... i tryed to put the data back into the hidden input fields but it dont works... PHP Code:
i would be very happy if someone could help me. BIG thx dionysos |
|
#17
|
|||
|
|||
|
i dont actually have the code on me to do this, but if you understand how the multi page manager works, this should make sense to you.
As you know the values are stored in javascript variables and then posted to hidden fields when you submit the page, to modify content, you just need to manually set these javascript variables ![]() |