Jump to content

bplogan

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

bplogan's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi there, thanks for reply, I tried what you suggested and get the following error: Warning: mssql_connect() [function.mssql-connect]: message: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON' code: <?php $host='IASSQLDEV'; /* The host/ip of your MSSQL server */ $dbuser='user'; /* The SQL DB user you setup in Management Studio */ $dbpasswd='password'; /* The password associated with the new SQL user */ $db = mssql_connect ($host,$dbusername,$dbpassword) or die("Error connecting to database");; // Attempt to connect to ?>
  2. Thanks for the reply. So I am going to create the user and pass on the MSSQL server. Then should I change the NT Authentication in the php.ini file back to off?
  3. Hello, I am new to php and MSSQL. I have php 5 running on a windows 2000 box. I added a DSN to the SQL server database I am trying to connect to using admin tools and Data sources in control panel. Now I'm not sure how to connect to the database via php. I found the following code using odbc_connect $dsn="issueTracker"; $username=""; $password=""; $sqlconnect=odbc_connect($dsn,$username,$password); $sqlquery="SELECT * FROM status;"; $process=odbc_exec($sqlconnect, $sqlquery); I am not entering anything for username and password as I setup the DSN using NT Authentication. I did set mssql.secure_connection = on in the php.ini file. I get the following error on the page: Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC SQL Server Driver] Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'., SQL state 28000 in SQLConnect Any help would be awesome!
  4. Ya, windows does suck, lol. I wish I could get them to switch.....I can't thank you all enough for the ideas, I will explore them all and get back to you. Again, thanks for geting me started.
  5. Sorry, should have posted this elsewhere......
  6. I have been assigned a project to create a page that displays the last reboot times of our company servers. All servers are running MS Server 2003. I found a way using ASP.NET but I hate ASP.NET with a passion. Does anyone know of a way to use PHP or javascript to accomplish this? Or does anyone have a different approach? I think I may have to bite the bullet and use ASP, but hopefully someone can suggest something different. Thanks.
  7. I got it, thanks for the help though. I needed quotes around the php. like this: fcontent[0]= "<?php echo $one; ?>"; fcontent[1]= "<?php echo $two; ?>"; fcontent[2]= "<?php echo $three; ?>"; Cheers!
  8. Thanks for the reply, but it didn't work. When the page loads, I get the "done but with errors" exclamation mark in the IE window. If I just put text for each of the array items, it works. Here is more code: <script type="text/javascript"> var delay = 2000; var maxsteps=30; var stepdelay=40; var startcolor= new Array(255,255,255); var endcolor=new Array(0,0,0); var fcontent=new Array(); begintag='<div style="font: normal 14px Arial; padding: 5px;">'; fcontent[0]= <?php echo $one; ?>; fcontent[1]= <?php echo $two; ?>; fcontent[2]= <?php echo $three; ?>; closetag='</div>';
  9. Need help passing php vairable to javascript array. I have three php variables. $one, $two, and $three. They each contain text. I need to get these variables into a javascript array. This is what I am trying below, but the array does not get these values. Any help would be appreciated. var fcontent=new Array(); fcontent[0]= <?php print $one; ?>; fcontent[1]= <?php print $two; ?>; fcontent[2]= <?php print $three; ?>;
  10. Thanks! I'll give it a shot
  11. I am a novice to php. I am trying to make a feature so users of my site can update their profile infomation like phone number, email, etc. From the users main page, they click "edit my profile info" which is a link, the code for it is: <a href="editProfile.php?id=123"> (The 123 is their userID which gets passed from when they log in. This takes them to the editProfile.php page and shows them their current info in editable textboxes. Their info is fetched from a MySQL database based on the "id" passed from the link above. The problem is, that I can just type in the address bar, mysiteUrl/editProfile.php?id=456, and it will let me change the person who is user ID 456's profile info. For example if someone had the userID od 222, I could type "mySiteURL/editProfile.php?id=222" into my browser and change their info. So anyone can just type in a userID and change things. How can I stop this? Can I hide the "id=XXX" somehow, so it isn't visible? Or am I going about his completely wrong? Any help would be greatly appreciated!!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.