php和聚合物飞镖 [英] php and polymert dart

查看:261
本文介绍了php和聚合物飞镖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想把一些值放入DB与 PHP
我使用的是聚合物飞镖。
是这个代码错了吗?
当我使用它只放$ calle,但$ Latitud,$纵不

I'm trying to put some values into DB with PHP. I'm using polymer dart . is this code wrong? When i used it only put $calle but $Latitud, $longitud not

html

<form action="conexion.php" method="post">
<input type=hidden name="latitud" value="{{latitud}}">
<input type=hidden name="longitud" value="{{longitud}}">
<input type="submit" value="submit">
</form>

php

<?php 
$hostname_dasavi_codes = "xxx"; 
$database_dasavi_codes = "xxx"; 
$username_dasavi_codes = "xxx"; 
$password_dasavi_codes = "xxx"; 
$dasavi_codes = mysql_connect($hostname_dasavi_codes, $username_dasavi_codes, $password_dasavi_codes) or trigger_error(mysql_error(),E_USER_ERROR);  
$calle="rolf";
$lat=$_POST["latitud"];
$lon=$_POST["longitud"];
mysql_select_db($database_dasavi_codes, $dasavi_codes); 
$query_java = "INSERT INTO ovnis (latitud,longitud,calle) VALUES ('$lat','$lon','$calle')"; 
$result=mysql_query($query_java);
?> 

dart

...
  @published String latitud;
  @published String longitud;
...
Geoposition startPosition;
String calle;
window.navigator.geolocation.getCurrentPosition()
.then((Geoposition position) {
  startPosition = position;
  latitud="${startPosition.coords.latitude}";
  longitud="${startPosition.coords.longitude}";

知道我是否可以使用 PHP 和dart在一起。
非常感谢!

I don't know if I can use PHP and dart together. Thanks you very much!

推荐答案

当然你可以在客户端和服务器上使用Dart。
他们甚至不必知道每个其他的实现细节。

Of course you can use Dart on the client and PHP on the server. They both don't even have to know of each others implementation details.

有关在Dart中处理表单的一些通用信息。
- 表单,HTTP服务器和Polymer with Dart (可能有点过时)

Some generic information about processing forms in Dart. - Forms, HTTP servers, and Polymer with Dart (might be somewhat outdated)

代码如何使用Polymer和表单

This questions have some example code how to work with Polymer, and forms

  • Passing values from login form to dashboard
  • Custom Events in Nested Polymer Dart UI

如果您需要更详细的资讯,建议您询问更具体的问题。

If you need more detailed information I suggest to ask a new more specific question.

这篇关于php和聚合物飞镖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆