/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Editting A User

I know PHP and JS can’t talk to each other however I’m trying to figure out how this can be done. I have retrieved from my database each characterName and its ID and I’m trying to put each back into a UL with each being an LI obviously. With the Remove link next to the character’s name like the function at the bottom has it. This was just a function I made for the add new handler so i was hoping I could just save it to use for this edit handler form. Any ideas how I could accomplish this. The query does work by the way it does retrieve the correct ids and characternames that the handler controls.

Here’s a link to the code.

[URL=”http://pastebin.com/piyr8HDW”]http://pastebin.com/piyr8HDW[/URL]

to post a comment
PHP

7 Comments(s)

Copy linkTweet thisAlerts:
@BelrickFeb 11.2011 — What do you mean php and JS cant talk to each other?

Absolutely they can! JS can send via GET for example.

PHP can build elements to be displayed upon a page that JS can grab the contents of.

AJAX in innerhtml or XML form can do this even better.

Your current code is too long for me to be bothered studying but i assure you that you can make what your trying to do by yourself.
Copy linkTweet thisAlerts:
@tirnaFeb 11.2011 — Loop through the result set from the db query and use echo to output the <li>'s and the remove link for each row in the result set.
Copy linkTweet thisAlerts:
@xtremer360authorFeb 11.2011 — Thank you tirna!
Copy linkTweet thisAlerts:
@xtremer360authorFeb 11.2011 — Are we talking loop through as in a js foreach statement? Or what is the idea here.
Copy linkTweet thisAlerts:
@tirnaFeb 11.2011 — To my understanding you have retrieved the records from th db using php. So use a php loop (usually a WHILE loop) through the result set from the db query and use echo to generate the html for the <li> and remove link for each record in the result set.

Google the php online manual for example code.
Copy linkTweet thisAlerts:
@xtremer360authorFeb 11.2011 — I'm just saying because if you notice at the bottom of my code that remove link and all of that part is jquery code.
Copy linkTweet thisAlerts:
@xtremer360authorMar 11.2011 — Is there a way I can apply what I have for my jquery function to the php array?
×

Success!

Help @xtremer360 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.23,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...