rjclancy's Profile User Rating: -----

Reputation: 1 Apprentice
Group:
Active Members
Active Posts:
56 (0.04 per day)
Joined:
18-March 11
Profile Views:
1,298
Last Active:
User is offline May 23 2013 12:41 PM
Currently:
Offline

Previous Fields

Country:
Who Cares
OS Preference:
Who Cares
Favorite Browser:
Who Cares
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:
0
Icon   rjclancy has not set their status

Posts I've Made

  1. In Topic: Android notifyDataSetChanged() not working!...

    Posted 21 May 2013

    View Postjon.kiparsky, on 21 May 2013 - 09:11 AM, said:

    Might get better traction on this in the Android forum.


    How to move???
  2. In Topic: insert into two different tables using php

    Posted 24 Sep 2012

    View Postnightscream, on 22 September 2012 - 09:05 AM, said:

    Quick writeup, between new PDO you should put the right values and the poloptions you should change to your needs
    <?php
    	$postTitle=$_POST['title'];
    	$user_id=$_POST['user_id'];
    	$postanswer1=$_POST['postan1'];
    	$postanswer2=$_POST['postan2'];
    	$postanswer3=$_POST['postan3'];
    	
    	$db = new PDO(''); // change it with the right details
    	$sql = "INSERT INTO `polls` (title, user_id) VALUES (?,?)";
    	
    	$polStmt = $db->prepare($sql);
    	$polStmt->bindValue(1, $postTitle);
    	$polStmt->bindValue(2, $user_id);
    	$polStmt->execute();
    	if($polStmt->execute())
    	{
    		$id = $db->lastInsertId();
    		$sql = "INSERT INTO poll_options(id, col1) VALUES(?,?)";
    		
    		$polOptStmt = $db->prepare($sql);
    		$polOptStmt->bindValue(1, $id);
    		$polOptStmt->bindValue(2, $postanswer1);
    		$polOptStmt->execute();
    	}
    	else
    	{
    		echo("unable to input poll");
    	}
    	
    header('Location:profile.php');
    exit();
    ?>
    


    Hi nightscream....iv been trying to get this working, and i seem to be getting somewere, but i think i might have a problem...all my code is mysql and not mysqli...i read somewere online to use PDO my code has to be mysqli????would this seem right to you???

    Thanks

My Information

Member Title:
D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Location:
Sligo, Ireland

Contact Information

E-mail:
Private

Friends

Comments

rjclancy has no profile comments yet. Why not say hello?