Nukemods Forum  
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 34
0 members and 34 guests
No Members online
Most users ever online was 611, 03-21-2008 at 10:10 PM.
» .::.
Online Degree - search for 1000+ online degrees, online colleges & online universities.
Tattoo - we are a group of tattoo enthusiasts
Gexa Energy - your absolute best choice in electric service
Texas Electric Choice

Go Back   Nukemods Forum > PHP-Nuke 7.x > Nuke 7.x - General

Reply
 
LinkBack Thread Tools Display Modes
Using the PHPNuke user table for SQL insert script.
Old
  (#1 (permalink))
Junior Member
 
Status: Offline
Posts: 38
Join Date: Dec 2004
Using the PHPNuke user table for SQL insert script. - 01-06-2006, 07:18 AM

So, I'm converting my hardcoded site over to PHPNuke 7.8.

I have a script that essentially inserts a rating into a database, and it has to have a userID to do so.

I currently use the Index Login Mod to integrate my insert script with the PHPBB users table, but I'm not quite sure how I can get it working with Nuke. Suggestions?

Code:
 <?

      if (($song["songtype"] == 'S') && ($userdata['user_id'] >= 0)) {

        echo "<form name=\"theForm\" method=\"POST\" action=\"do_rating.php\">";

        echo "<input type=\"hidden\" name=\"songID\" value=\"". $song["songID"] . "\">";

      }

    ?>


       <font color="045bc1">Rating (you):</font>


       <?

          if ($userdata['user_id'] >= 0) {

            if ($song["songtype"] == 'S') {

              $db->open("SELECT song_rating.rating FROM song_rating where song_rating.songID = " . $song["songID"] . " AND song_rating.userID = " . $userdata['user_id']);

              $the_rating = $db->row();



              if ($the_rating["rating"] == null)

                $my_rating = 0;

              else

                $my_rating = $the_rating["rating"];



              InputComboRating("rating",$my_rating,0,'0, 1, 2, 3, 4, 5');

            }

            else

              echo "This cannot be rated";

          }

          else

            include("ratings/please_login_short.php");

        ?>



    <?

      if (($song["songtype"] == 'S') && ($userdata['user_id'] >= 0)) {

        echo "</form>";

      }

    ?>

</form>
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Blog style ,add social bookmark script for phpNUKE and CMS dainbramage News 0 06-08-2007 10:26 PM
Couldn't insert row in categories table... Dwane Nuke 7.x - General 1 02-14-2006 11:48 AM
PhpNuke Upload Script jbaudio Other "stuff" 0 01-24-2005 07:28 AM
Could not insert data into users table SureFire Purged Topics 5 08-03-2003 01:08 AM
I LOVE this User Menu script! Where may I find it please?? macfionn Purged Topics 1 03-19-2003 08:12 AM




vBulletin Skin developed by: vBStyles.com


LinkBacks Enabled by vBSEO 3.3.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31