Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
Irina
@2Irina2
@marhyorh basically data is an object and i can access its attributes by data.city ?
Ademola Adegbuyi
@ooade
@2Irina2 Yeah :+1:
Irina
@2Irina2
@ndburrus i'll take a look, thank you :)
CamperBot
@camperbot
2irina2 sends brownie points to @ndburrus :sparkles: :thumbsup: :sparkles:
:star2: 1322 | @ndburrus |http://www.freecodecamp.com/ndburrus
Irina
@2Irina2
@marhyorh and do i need to add other sources in codepen?
Ademola Adegbuyi
@ooade
@2Irina2 No. Just Jquery will do
Irina
@2Irina2
@marhyorh sounds great, thank you so much
CamperBot
@camperbot
2irina2 sends brownie points to @marhyorh :sparkles: :thumbsup: :sparkles:
:warning: 2irina2 already gave marhyorh points
Ademola Adegbuyi
@ooade
@2Irina2 YWC :+1:
Dario Idrovo
@djidrovo1
who is good with PHP?
I need to know why my contact form is not working
:/
Ademola Adegbuyi
@ooade
@djidrovo1 show your code
Irina
@2Irina2
@marhyorh okay but how do i get the weather now? the problem is that i dont know how to call the api .. If i click on the examples on the site it keeps giving me errors..
Dario Idrovo
@djidrovo1
<?php 
$name = $_POST[name];
$email = $_POST[email'];
$message = $_POST['message'];
$formcontent="From: $name \n Message: $message";
$recipient = "djidrovo1@gmail.com";
$subject = "Contact Form";
$mailheader = "From: $email \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
echo "Thank You!";
?>
@marhyorh
this is my form
Ademola Adegbuyi
@ooade
@2Irina2 were you able to log out the longitude and latitude??
Irina
@2Irina2
the api responds with a json object and i dont know how to store it
Dario Idrovo
@djidrovo1
<form action="mail.php" method="POST">
          <p class="form-align">Name</p> <input type="text" name="name">
          <p class="form-align">Email</p> <input type="text" name="email">
          <p class="form-align">Message</p><textarea name="message" rows="6" cols="25"></textarea><br />
          <input class="btn" type="submit" value="Send">
        </form>
Irina
@2Irina2
yeah i know how to get the lat and long now..
Ademola Adegbuyi
@ooade
@djidrovo1
$name = $_POST[name]; // should be $_POST['name']
$email = $_POST[email']; // should be $_POST['email'];
Irina
@2Irina2
This message was deleted
Ademola Adegbuyi
@ooade
@2Irina2 do you av an openweather API_KEY??
Irina
@2Irina2
and i saw this "api.openweathermap.org/data/2.5/weather?lat={lat}&lon={lon}" and i know i am supposed to replace (lat) and {long} with the values i get from the ipinfo.io
yeah, i also got a key but i dont know how that is supposed to help me either
Trung Vo
@trunglive
hello guys, I just finished my first project Build a Tribute Page at http://codepen.io/trunglive/pen/bZxXNR/, I really appreciate your suggestion and feedback!
Dario Idrovo
@djidrovo1
@marhyorh I hade it with the ' but did not work
greg
@wearenotgroot
@2Irina2 put it as a url parameter
apiURL + '&appid=some numbers'
Dario Idrovo
@djidrovo1
@marhyorh here is my site
Irina
@2Irina2
@wearenotgroot i don't follow
Ademola Adegbuyi
@ooade
Dario Idrovo
@djidrovo1
@marhyorh this is what I get when i hit send
!
File not found (404 error)
If you think what you're looking for should be here, please contact the site owner.
Irina
@2Irina2
@marhyorh {"cod":"404","message":"Error: Not found city"}
Dario Idrovo
@djidrovo1
which is what my site is supposed to say when it hits a "missing" page
Ademola Adegbuyi
@ooade
@djidrovo1 do u av a mail.php??
@2Irina2 No, i expected you to pass a longitude and latitude in, like this http://api.openweathermap.org/data/2.5/weather?lat=10&lon=10&APPID=02c0da530b8cf7771cee190bae9256af
Dario Idrovo
@djidrovo1
@marhyorh no
Ademola Adegbuyi
@ooade
@2Irina2 Yeah, u re getting it, now handle the longitude and latitude variable with javascript, wrap it with $.getJSON
@djidrovo1 then you should remove the form action
Irina
@2Irina2
@marhyorh yeah but how do i store all the info given by this link? var weather = http://api.openweathermap.org/data/2.5/weather?lat=44.1833&lon=28.6500&APPID=433e5ac19c344d585ded5fba77c92ded" ?
greg
@wearenotgroot
@2Irina2 remember getJSON are asynchronous so you need to call the getJSON for the openweather inside the callback function of your getJSON for ipinfo
@2Irina2 you need to replace those lat and lon numbers with variables.
@2Irina2 the lat and lon values will come from the object in the result of your getJSON (ipinfo)
Irina
@2Irina2
@wearenotgroot oh yeah, i am aware of the fact that lat and lon should be variables.. they depend on the position of the user... but for now, i need to understand how to gather the data from the openweathermap api