Jump to content

Prompt / Wait for user input


rubing

Recommended Posts

Hey dudez,

 

I am trying to write a php script that searches opens a new browser window & search engine query string, depending on user input. 

 

If the user presses 1, i want to iterate through the array and start the next search. 

 

however, if the user presses 0, i want to skip this query and proceed to ask the user about the next one.

 

I cannot find anything about waiting for user input in php.  Does something like this exist.  THanks all!!!

Link to comment
Share on other sites

One time I fell asleep and dreamed I was an RSS feed.  Why can't php be more like that, able to do anything!!!!???  I hate php!! it's a dirty whore. 

 

 

OK, frederick you're a nice guy.  i guess i have no other choice.  YES!!!  I would definitely appreciate some help with javascript.  even though i really don't have good feelings about this javascript thing.

Link to comment
Share on other sites

ok my website is www.birminghammusiclive.com

 

If you click on a day you'll see a list of music events some of them have links and some do not.

 

I want to issue a mysqlfetcharray query to my database and return one at a time bands which are not yet hyperlinked.  They should open in a new tab as a yahoo! search query: "music profile" "BANDS NAME"

 

and then the script should wait for my input, while I go off to find the band's myspace home page.

 

I haven't coded anything yet cause I knew that i really just needed to figure out how to get user input and the rest would be simple. 

Link to comment
Share on other sites

You need an AJAX function to be able to do this. Google 'ajax tutorials' to get on your way. Its not easy programming by any means, but it will allow you to use a combination of javascript (client-side) and php (server-side) in order to do what you want.

 

I haven't coded anything yet cause I knew that i really just needed to figure out how to get user input and the rest would be simple.

 

Unfortunately its not going to be simple at all.

Link to comment
Share on other sites

setup of the table? two fields, band name and hyperlink? if you need ajax then im not understanding what you want to do correctly. you want to display all band names without hyperlinks and when you click on them go to yahoo search for music profile band name and then what will the page wait for you to do? if you need it to go through the next php row with no hyperlink then yea you have to use ajax because the keyboard function is js whereas the database info is php but why do you even want to do that? if this is just for you as the admin of the site then its just as quick to just display all the links to the yahoo search instead.

Link to comment
Share on other sites

yes! that's what i want to do.  i guess you are suggesting that i am lazy, by not just printing out all the links and then copying and pasting them???

 

 

well....i just think it would save me a lot of time to have it automated.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.