Jump to content

jairathnem

Members
  • Posts

    93
  • Joined

  • Last visited

jairathnem's Achievements

Newbie

Newbie (1/5)

2

Reputation

  1. not sure what you are trying to do here.
  2. issue is with the insert command. try something like: INSERT INTO kommentar (tittel, navn, tekst, tidsstempel, innleggid) VALUES (GetSQLValueString($_POST['tittel']"text"),GetSQLValueString($_POST['navn'], "text"),GetSQLValueString($_POST['tekst'], "text"),NOW(),getSQLValueString($_GET['innleggid'], "int"))
  3. I am completely new to SOAP calls in php. But I did give it a try based on help from google. <?php $client = new SoapClient("http://www.webservicex.net/globalweather.asmx?WSDL",array('proxy_host' => "myproxy", 'proxy_port' => 8080)); $params = array("CountryName" => "united states"); $response = $client->__soapCall("GetCitiesByCountry",array($params)); var_dump($response); ?> and it did generate the needed output. although when I changed $response = $client->__soapCall("GetCitiesByCountry",array($params)); to $response = $client->GetCitiesByCountry(array($params)); It didnt work, and threw and error.This might help. (proxy setting not necessary).
  4. there is your problem. $imgs isn't holding any data. check how it is generated.
  5. how is value stored to $imgs? do a var_dump($imgs) before the foreach loop and check if it holds any data.
  6. Look at the example carefully. You missed: 1. Colon at end of if statement and at end of elseif statement. 2. You missed the endif; statement at the last.
  7. Look at the sample below taken from PHP manual page: <?php /* Incorrect Method: */ if($a > $b): echo $a." is greater than ".$b; else if($a == $b): // Will not compile. echo "The above line causes a parse error."; endif; /* Correct Method: */ if($a > $b): echo $a." is greater than ".$b; elseif($a == $b): // Note the combination of the words. echo $a." equals ".$b; else: echo $a." is neither greater than or equal to ".$b; endif; ?>
  8. use GET or POST request to transfer the selected field over to other page.
  9. mysql_fetch_row fetches a single row. use mysql_fetch_assoc instead of that. Even better suggestion - move to PDO instead of mysql.
  10. you are seperating it based on ',' and storing it in $array, but for sort you are giving the string again. Hence the error. you should call sort($array) and not sort($numberstring) also you do not need to assign it to a variable,it sorts and stores it in the array given. sample below. <?php $num = "1,4,2,5,2,8"; $array = explode(',',$num); sort($array); var_dump($array); ?>
  11. wow. I didn't know that would work! thanks!
  12. echo $response and see if it is holding value. $response = file_get_contents('http://api.nfldata.apiphany.com/developer/JSON/NewsByTeam/ARI?'.$getdata, false, $context); echo $response; $data = json_decode($response,true); echo $data['Content']; if it is printing, next check $data else issue with the api. $response = file_get_contents('http://api.nfldata.apiphany.com/developer/JSON/NewsByTeam/ARI?'.$getdata, false, $context); $data = json_decode($response,true); var_dump($data); echo $data['Content']; if it did check the structure of the printed array. these are basic triage methods.
  13. you gotta learn the basics first. just typing $data['content'] won't show anything. $response = file_get_contents('http://api.nfldata.apiphany.com/developer/JSON/NewsByTeam/ARI?'.$getdata, false, $context); $data = json_decode($response,true); echo $data['Content'];
  14. you missed the important line - $data = json_decode($response,true); check my previous post!
×
×
  • 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.