Jump to content

Archived

This topic is now archived and is closed to further replies.

kenwvs

Setting a Value

Recommended Posts

I am trying to get this code to work but I am not sure how to set the value for the $contact.  The Work=Contact is the problem.  Work is in the database, but Contact is not.  Basically, I have a form that I put the data in, and it calls it up from the database by Work.

Ken

[code]include_once "myconnect.php";
$query=mysql_query('SELECT Work, Sched, Name, Site, Serial, Hours, Starts, Issue, Severity,
Resolution, Assistance, PartsA, PartsB, PartsC, PartsD, PartsE, PartsF, PartsG,
Safety, Image1, Image2, Image3, Image4 FROM workorder WHERE Work=($Contact)')or die(mysql_error())
;
?>[/code]

Share this post


Link to post
Share on other sites
[code]<?php
include_once "myconnect.php";
$query=mysql_query('SELECT * FROM workorder WHERE Work={$Contact}')or die(mysql_error())
;
?>[/code]

Try that. Instead of all those field names I used an * meaning all fields.

Share this post


Link to post
Share on other sites

×

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.