Take a look at this form I could really use some help.
This is the form:
<form method="get" name="sw">
<select name="swspecies">
<option value="">Please Select...</option>
<option name="the Ewoks" value="0">the Ewok</option>
<option name="the Wookiee" value="1">the Wookiee</option>
<option name="the Jawa" value="2">the Jawa</option>
<option name="the Mon Calamari" value="3">the Mon Calamari</option>
</select>
<input type"text" name="swcharactername" value="">
<input type="submit" value"Go!">
</form>
This is the PHP:
<?php
$speciewithname_array=array(
0=>"the Ewok",
1=>"the Wookiee",
2=>"the Jawa",
3=>"the Mon Calamarian");
$speciewithoutname_array=array(
0=>"Ewok",
1=>"Wookie",
2=>"Jawa",
3=>"Mon Calamarian");
if(is_array($post) && count($post)>1){
if($post["swcharactername"]!=""){
$speciewithname=$speciewithname_array[$key];}
//what i'm trying to write here is IF swcharactername is NOT blank then I want to extract out your charactername (the name you submitted) and specie for later use. It would maybe be better two makes these two variables into one variable. example: "Creative Force the Ewok". But I don't know how 🙁
elseif($post["searchtext"]==""){
$speciewithoutname=$speciewithoutname["$key"];}
//what i'm trying to write here is IF swcharactername is blank then charactername is Ewok.
I then want to use the variables i have gathered to open up a window (doesn't matter if it's the same window or a new one):
"http://localhost/starwarsrpgame/characterinfo/($swcharactername + $speciewithname).html or http://localhost/starwarsrpgame/characterinfo/(one variable).html
As you can see from the coding I absolutely know nothing about PHP.
I'm sure you have all written tons of threads explaining this. But I just don't know where to search for them. 🙁
Thanks