PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 14th, 2001, 04:51 AM
mo_fa mo_fa is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Posts: 0 mo_fa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 37 m 30 sec
Reputation Power: 0
from ASP to PHP...

Hey everyone:
I am a newbie to PHP programming for 4 months now and nowadays reading "Beginning PHP4" to switch a news site from ASP to PHP (as i convinced the boss of the company i am working for that PHP is the best server side scripting language on the web now).. so would you help me to prove that?

Here is the main and repeated part of the ASP code for our site which retrieving a title, a summary and a small image for a news

----------------------------------------------------------------------------
<%
set rsmoheet=server.CreateObject("adodb.recordset")
sql=" SELECT TOP 1 news_ent.NEW_ID, NEW_TITLE, new_summary FROM news_ent"&_
" where subtypeid=61 and news_ent.new_id IN (SELECT new_id FROM new_mainsub_rel WHERE subject_id = 1)"&_
" ORDER BY news_ent.new_id DESC"
rsmoheet.open sql,con

set img=server.CreateObject("adodb.recordset")
sql=" select new_image_rel.new_id,image_id from new_image_rel where new_image_rel.new_id=" & rsmoheet("new_id")
img.open sql,con
%>
<td></td>
<td valign=bottom dir=rtl><p align=right><a href="showarabi.asp?new_id=<%if not rsmoheet.eof then
Response.write rsmoheet("new_id")
end if%>"><font face=tahoma size=4 color="#AC0404"><%if not rsmoheet.eof then
Response.write rsmoheet("new_title")
end if%>
</font></a><br><img src="images/pix.gif" width=1 height=30><font face=tahoma size=2 color="#000000">
<%if not rsmoheet.eof then
v=rsmoheet("new_summary")
if Len(v)>180 then v=left(v,180)
Response.Write (v)
end if %>
</font>.............<a href="showarabi.asp?new_id=<%if not rsmoheet.eof then
Response.write rsmoheet("new_id")
end if%>"><font face=tahoma size=2 color="#3C53C7"><u>more</u></font></a>
</p></td>
<td></td>
<td></td>
<td valign=bottom><br>
<img src="../image/<%if not img.EOF then
x=img("image_id")
ms="small"+cstr(x)
Response.Write ms
end if%>.jpg" width=95>
</td>
--------------------------------------------------------------------------------

Note: The connection with the server and the select statement is OK..
Thanks in advance...

Reply With Quote
  #2  
Old October 14th, 2001, 11:38 AM
Atticus Atticus is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 61 Atticus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Send a message via ICQ to Atticus
Do you want someone to rewrite that in PHP? Maybe you should work on that yourself.
__________________
Adam "Atticus" Plumb
"A man doesn't automatically get my respect, he has to get on his knees and beg for it."

Reply With Quote
  #3  
Old October 14th, 2001, 12:20 PM
podulator podulator is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Posts: 45 podulator User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 8 sec
Reputation Power: 9
or if yer feeling lazy, there's an asp 2 php converter app kicking around on the web somewhere that does what it says on the tin......

do a google search for asp2php and you'll probably turn it up...

truth is, having spun through what you gotta convert, it'd be quicker by hand though.

Reply With Quote
  #4  
Old October 15th, 2001, 03:59 AM
mo_fa mo_fa is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Posts: 0 mo_fa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 37 m 30 sec
Reputation Power: 0
Thanks "podulator", i got the asp2php, i think it will help me insha'Allah in my work...(although you shouldn't say that i am lazy)
i am just a beginner as i mentioned, and i did few projects with PHP, but i didn't retrieve an image before that
anyway, thanks again...

salam

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > from ASP to PHP...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT