I very experience with ColdFusion and am struggling with a PHP project. In CF when I do a query, I can easily check to see if any records were returned. I can't quite figure out how to do this with PHP. I'm using Dreamweaver to code the pages, but becuase of my newness I don't understand.
Here's how I'd do it in CF:
<cfquery name="getLogin" datasource="datasource">
SELECT username, userID FROM users WHERE userID = '#URL.UID#'
</cfquery>
<cfif #getLogin.RecordCount# GTE 1>
<cfset SESSION.UID = #getLogin.UserID#>
<cflocation url="sompage.cfm">
<cfelse>
<cflocation url="login.cfm">
</cfif>
Anyone care to help me translate?
Thanks,
James