Yep, after I saw your first post, it got me thinking and I removed the ticks on the variable all together like you just suggested and it quit complaining. Now It's not wanting to connect to the server, gotta figure out the Windows Authentication piece and I think I'll have a working page.
Thanks On Thu, Mar 19, 2009 at 9:04 AM, Matthew Frederico <[email protected]>wrote: > UGH Sorry .. lets try that again... > Whats happening is the function mssql_bind is looking for a literal > VARIABLE, not the VALUE of the variable. So simply REMOVING the > quotes or single ticks in the mssql_bind statements should produce > desired results. > > <?php > > require 'credentials.php'; > > $location_id=$_POST['location_id']; > $description=$_POST['description']; > $wh_id=$_POST['wh_id']; > > > // Connect to MSSQL > mssql_connect("$dbserver"); > mssql_select_db("$database"); > > // Create a new stored prodecure > $stmt = mssql_init('SP_stored_procedure'); > > // Bind the field names > mssql_bind($stmt, '@location_id', $location_id, VARCHAR, > false, false, 13); > mssql_bind($stmt, '@description', $description, VARCHAR, > false, false, 50); > mssql_bind($stmt, '@wh_id', $wh_id, VARCHAR, > false, false, 10); > > // Execute > mssql_execute($stmt); > > // Free statement > mssql_free_statement($stmt); > ?> > > > -- > -- > -- Matthew Frederico > _______________________________________________ UPHPU mailing list [email protected] http://uphpu.org/mailman/listinfo/uphpu IRC: #uphpu on irc.freenode.net
