php


How to change if value 1 to get like General


As you can see in the picture, I want value should be somewhere else, I have 6 values ​​that goes up to ?, but would rather it go to another word use
http://image.prntscr.com/image/8c26c451b10a481f9a8d0aaba16bf311.png
As you can see in the picture, I want value should be somewhere else, I have 6 values ​​that goes up to ?, but would rather it go to another word use
http://image.prntscr.com/image/1d271a5f156842d0ac88c5f9c8e114aa.png
As you see in the picture I want it to be like that. Check is value 2 it will be something else. Which appear on the image with the "support" that I let the last image
<?php
$con = mysql_connect("localhost","root","**");
if($con)
{
$db = mysql_select_db("habix");
if($db)
{
$sql = "select * from user_tickets_table";
$result = mysql_query($sql);
if($result)
{
echo "<table border='1' style='width:100%'>";
echo "<tr>";
echo "<th>ID</th>";
echo "<th>Tittel</th>";
echo "<th>Beskjed</th>";
echo "<th>Dato</th>";
echo "<th>Type</th>";
echo "<th>Svar</th>";
echo "<th>Mer Muligheter</th>";
echo "</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr id='".$row['id']."'>";
echo "<td>".$row['id']."</td>";
echo "<td><textarea style='border:0px'>".$row['title']."</textarea></td>";
echo "<td><textarea style='border:0px'>".$row['message']."</textarea></td>";
echo "<td>".$row['ticketdate']."</td>";
echo "<td>".$row['issue_no']."</td>";
echo "<td>".$row['response']."</td>";
//echo "<td><button class='btn btn-primary' value='".$row['id']."' onclick='reply(".$row['id'].")'>Reply</button><button class='btn btn-primary' onclick='remove(".$row['id'].")'>Delete</button></td>";
echo "<td>";
echo "<form action='' method='post'><input type='hidden' name='idd' value='".$row['id']."'/><input type='submit' value='Slett!' name='del' onclick='return mycheck();'/></form>";
echo "</td>";
echo "</tr>";
}
echo "</table>";
}
else echo "Something is not right, Either there are no messages or some another error";
}
else echo "Error establishing database connection";
}
else echo "Error establishing connection to server";
?>
Change row
echo "<td>".$row['issue_no']."</td>";
to
$types = [1 => 'General', 2 => 'Support'];
echo "<td>".(isset($types[$row['issue_no']]) ? $types[$row['issue_no']] : $row['issue_no'])."</td>";
Later it would be a good idea to move $types declaration higher up the code, so it does not get recreated every loop iteration.

Related Links

Running a PHP script with crontab
Update time format using implode and explode
PHP - searching string with database LIKE syntax/wildcards (%, _) [duplicate]
cakePHP find(“list”) returns empty array
php - htaccess: redirect .png to .php page and display html
Are PHP PECL extentions on Cloud9 working?
PHP session variable gets destroyed on refresh
Get the Apache error code and display it in PHP
get UserId when the button is clicked
Syntax error or access violation: 1103 Incorrect table name with $_POST array data
Return error message PHP
How to add variable in a header function?
Hebrew words and letters become question marks
get_terms orderby most popular post views wordpress
how to generate PDF/A-1a pdf in PHP?
how to store back the cropped image in folder php?

Categories

HOME
openshift
visual-studio
events
jms
livecode
enums
code-formatting
nsview
biztalk
elisp
google-sheets-query
openflow
vue-resource
impala
lapack
business-intelligence
bundler
cuba-platform
nest-api
maven-plugin
jaspersoft-studio
bazaar
sharedpreferences
conda
mime-types
raima
fusetools
python-appium
python-imageio
spring-annotations
javax.persistence
rust-cargo
wampsharp
cucumber-junit
transform
extbase
robust
yoast
spooler
git-tfs
sendinput
reverse-dns
.net-micro-framework
roracle
beeline
sharpdx
visual-format-language
line-intersection
email-forwarding
case-when
emf-compare
thread-exceptions
okio
openquery
jeasyui
android-async-http
vaadin4spring
verisign
univocity
in-app-billing
juniper-network-connect
google-maps-api-2
asp.net-web-api-helppages
blank-line
canopy
wlanapi
kefir.js
ipod
ocmockito
phonegap-facebook-plugin
juttle
string.format
n-tier-architecture
iodocs
webmethod
communicate
coding-efficiency
sqlbindparameter
accountmanager
jomsocial
jms-serializer
lync-2010
django-sites
illuminate-container
san
semicolon
django-filebrowser
multiscaleimage
getopt-long
server-name
kaazing
dropshadow
affinetransform
winsxs
channelfactory
turbine
aptitude
ccl
bucket
twitter-feed
chronic

Resources

Encrypt Message