How can I display the selected value of the option using PHP?
For example I have this code:
var xx = document.xx.sbox;
if(document.xx.sbox.selectedIndex != 0)
alert("selected is "+xx.selectedIndex);
else alert("None is selected");
<select name=sbox onChange="sevent()">
<option value="default">Select Option</option>
<option value="option 1">option 1</option>
<option value="option 2">option 2</option>
Here, it prompts whatever option you select. What I wanted to do is to display
the value of the selected option using PHP. How can do it?
I am the WikiSysop of my Bikol Thesaurus. I need also other people as
administrator(s) in order to supervise synonym/meaning contributions of users.
And also, users will know who the administrators are. How can i promote a user
as one of administrators?
2009/11/23 Roan Kattouw:
> You need to use action=import, not action=upload to import files.
> Uploading the file as described there does not mean uploading it with
> action=upload, but uploading/embedding it in an HTTP request to
Thanks, but can you give me the exact format and preferably a sample
request for doing this? It's not clear from the documentation.
2009/11/20 Roan Kattouw (Catrope):
> MediaWiki 1.15 does not have an upload API module. There will be one
> in the 1.16 release (whenever that is), and the upload API is also
> enabled on Wikipedia.
Well, darn it. How do API imports in 1.15 work then? From the API:Import
" Pages can be imported with action=import, either by uploading an XML
file or by specifying a page from another wiki (also known as
I'm trying to use the API to slurp in export files generated by another
I'm trying to upload a file via the API and wget, based on this from
api.php ? action=upload & filename=Test.txt & file=file_contents_here & token=+\
Login and fetching token is OK, but on upload...
wget --load-cookies cookies.txt -O upload.xml \
goes here]&token=$EDITTOKEN" \
I get this:
<error code="unknown_action" info="Unrecognized value for parameter
'action': upload" xml:space="preserve">
What's wrong? Is this MediaWiki's way of saying it's not happy with with
the lack of multipart/form-data...? I'm using MediaWiki 1.15.1.
And yes, I'm aware that wget probably isn't the best choice for this.
Pointers to working code in any language (PHP etc) are welcome.
I'm using the API to extract the raw wiki text from my pages, using
the "?action=query&titles=Main_Page&export&exportnowrap" syntax. That
Now I would like to get the templates expanded out in the result, so I
which does the job, as expected, but it also strips out the comments.
My problem is that the comments are meaningful to me (I use them to
help process the wiki text in subsequent steps).
Is there a way to expand templates with the API, but leave the
--- MENSAJE AUTOMATICO ---
Estoy probando mi lista de contactos. Pueden ignorar este msg.
Mis mejores deseos para todos.
--- AUTOMATIC MESSAGE ---
I'm testing my contact list. Please ignore this msg.
My best wishes for all.