HTML页面未使用php脚本从数据库获取值

HTML页面未使用php脚本从数据库获取值,php,javascript,mysql,Php,Javascript,Mysql,我使用php脚本从mysql数据库中获取数据,问题是表中有数据,但当我获取returen时,并没有 它显示以下错误 Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/content/i/h/u/ihus235/html/cs/emrapp/surveyDescription.php on line 73 [] HTML代码 <html<bod

我使用php脚本从mysql数据库中获取数据,问题是表中有数据,但当我获取returen时,并没有

它显示以下错误

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/content/i/h/u/ihus235/html/cs/emrapp/surveyDescription.php on line 73
[]

HTML代码

  <html<body>
   <INPUT TYPE = "Text" VALUE ="user_id" NAME = "user_id"> This form allows you to connect to the server.<br>
   <form action="surveyDescription.php" method="post" enctype="multipart/form-data"><br>

   Type (or select) Filename: 
    <input type="submit" value="submit">
    </html>
问题出在

$query = mysql_query("SELECT s.*, u.user_id FROM survey_master AS s 
JOIN user_profile AS u on u.user_id = s.user_id where s.user_id=$user_id");
可能是$user\u id没有任何值。请检查。

放在
表单中的
标记中

<body>

   <form action="surveyDescription.php" method="post" enctype="multipart/form-data"><br>
   <INPUT TYPE = "Text" VALUE ="user_id" NAME = "user_id"> This form allows you
    to connect to the server.<br>
   Type (or select) Filename: 
   <input type="submit" value="submit">
    </form>

</body>


此表格允许您 连接到服务器。
键入(或选择)文件名:
更多语法错误:


标记丢失“>”,并且您没有在末尾关闭
标记。给有时间解释这一切错误的人道具。你的查询中有一个错误。你能解释这个错误以及如何删除这个错误吗,然后通过…在那里输入一些伪值或完全删除该部分。我是echo$used\u id,但没有显示我在TextBox中输入的任何值。您的user\u id输入框是外部表单,这就是为什么将其放入表单中的原因,另外一件事user\u id具有int值,因为我理解您的代码。如果它是var char,则使用此$query=mysql\u查询(“从调查中选择s.*,u.user\u id作为s加入用户\u配置文件作为u on u.user\u id=s.user\u id,其中s.user\u id=”“$user\u id”。”);并将输入框放在表单标签下。我认为问题在于我们使用where子句的查询中,因为现在用户id也显示在echoAjay中,但当我从iphone应用程序调用同一脚本时,它对我测试我使用的html页面不起作用
<body>

   <form action="surveyDescription.php" method="post" enctype="multipart/form-data"><br>
   <INPUT TYPE = "Text" VALUE ="user_id" NAME = "user_id"> This form allows you
    to connect to the server.<br>
   Type (or select) Filename: 
   <input type="submit" value="submit">
    </form>

</body>