LiveWire Network Peer Answers Peer Support Teen Forums Tech Forums College Forums 702 users online 225409 members 1223 active today Advertise Here Sign In
TeenCollegeTechPhotos | Quizzes | LiveSecret | Memberlist | Dictionary | News | FAQ
Member Spotlight
HoldingOnToNothing
Peeves: Ignorant people. And when people get i...
Mood: Flirty
You have 1 new message.
Emergency Help
Until you sign up you can't do much. Yes, it's free.

Sign Up Now
Membername:
Password:
Already have an account?
Invite Friends
Active Members
Groups
Contests
Moderators
6 online / 28 MPM
Fresh Topics
  LiveWire / Technical Forums / Web Design & Search Engine Optimization / Adding Reply

Quoting Post
Archived Topic: It will not be bumped to the top of the forum.
Topic Need some help...
Membername   Not a member? Sign Up Free (takes 20 seconds)
Password   Forgotten your password?
Post

Font:   Size:   Color:

FAQ Keyword Search:
Post Options
Favorites Manager
Notify me of new replies to this topic by email
Notify me of new replies to this topic by private message
Original Post
yoshiness Posted at 3:10 pm on Mar. 21, 2008
This is what I'm trying to do :

When a user clicks on an image, PHP script to insert a value into a field in MySQL table for a row that ALREADY exists... Much like a shopping cart for a specific user...

Basically, what I tried earlier was reading information from a cookie, but what happened in return, is it created 2 new NULL users... :/

Help?

Replies
allsmiles Posted at 4:57 pm on Mar. 23, 2008
Okay... I'm gonna PM you.
yoshiness Posted at 4:53 pm on Mar. 23, 2008
I still need some help... I need some in-depth details... Like... How to use the coding for one??? :P

I also don't want to use a prebuilt custom CMS... That only makes things more difficult :)

Here's a flash on what I'm trying to do...

http://img227.imageshack.us/my.php?image=examplegx3.swf

Basically, this is the function I'm using :

<?php

print"<img id='Picture' src='./picture.gif'>"

?>

How would I do what I showed you in the Flash movie?

allsmiles Posted at 6:52 am on Mar. 22, 2008
Let's presume that the name of the image is defined by the variable $object, and the username is referenced by an id $_COOKIE['ID']. The certain spot in the table can be a record in the table `userImageClick` made unique by the user's ID.

On the page that the image links to (presumably something like imageclick.php?id=$object), the code should simply be something like:

Code:

$sql = mysql_query("UPDATE `userImageClick` set `imageID` = '$_GET[id]' WHERE `userID` = '$_COOKIE[ID]' LIMIT 0,1") or die('Query failed.');

I get the feeling that I've misunderstood what you want to happen though...

yoshiness Posted at 8:01 pm on Mar. 21, 2008
Okay. When a user clicks on an image, I want PHP to be able to identify the ID/name of that image depending which name/ID I gave it. Then, I want PHP to insert the image ID/name into a certain spot in a MySQL table for only a certain username. To get the username listed in the MySQL table, it should analyze the cookie containing the username, then match it to a username in the database, and insert it into a certain spot, depending which spot is available.

As I stated before, it should be sorta like an online shopping cart.

/The name/id thing in the image I was talking about :

"<img src='...' width=123 height=456 name=object id=object>"

I'm not so good with PHP programming. I am trying to learn as I go, so that I don't have to keep coming here so often, and spamming the place up.

allsmiles Posted at 5:45 pm on Mar. 21, 2008
Any chance you can rephrase that? Are you having problems with an update query?
All 5 previous replies displayed.