Jump to content

Spraban9

Members
  • Posts

    29
  • Joined

  • Last visited

Spraban9's Achievements

Member

Member (2/5)

0

Reputation

  1. same database like the localhost have but in 000webhost phpmyadmin display this error to this query
  2. this coding is working in localhost <?php include("include/connection.php"); $profile= mysql_query("SELECT count( user )FROM (SELECT user FROM computerrepair UNION ALL SELECT user FROM computersale UNION ALL SELECT user FROM hospital UNION ALL SELECT user FROM hotel UNION ALL SELECT user FROM house UNION ALL SELECT user FROM land UNION ALL SELECT user FROM mobile UNION ALL SELECT user FROM theater UNION ALL SELECT user FROM upload UNION ALL SELECT user FROM vechicle) AS a WHERE user = '$login_session'",$conn); $menus=mysql_fetch_assoc($profile); $noof=$menus['count( user )']; ?> Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/a8326388/public_html/profile.php on line 59 $menus=mysql_fetch_assoc($profile); is in line 59
  3. create view alltable as SELECT cr.city,cr.address,cr.description,cr.contact,cr.postdate,cs.city,cs.address,cs.description,cs.contact,cs.postdate,la.city,la.address,la.description,la.contact,la.postdate,ho.city,ho.address,ho.description,ho.contact,ho.postdate from computerrepair as cr,computersale as cs, land as la,house as ho where cr.postdate =cs.postdate and cs.postdate=la.postdate and la.postdate=ho.postdate and cr.postdate='2013-03-26' hi friends i create view for get data in order to postdate but this coding show below error. #1060 - Duplicate column name 'city' how to solve this problem friends
  4. create view alltable as(SELECT `title`,`city`,`address`,`description`,`contact`,`postdate`from computerrepair union SELECT `title`,`city`,`address`,`description`,`contact`,`postdate`from computersale union SELECT `title`,`city`,`address`,`description`,`contact`,`postdate`from land union SELECT `title`,`city`,`address`,`description`,`contact`,`postdate`from house union SELECT `title`,`city`,`address`,`description`,`contact`,`postdate`from vechicle union SELECT `title`,`city`,`address`,`description`,`contact`,`postdate`from mobile)order by postdate this also not working
  5. SELECT `title`,`city`,`address`,`description`,`contact`,`postdate`(SELECT `title`,`city`,`address`,`description`,`contact`,`postdate`from computerrepair union SELECT `title`,`city`,`address`,`description`,`contact`,`postdate`from computersale union SELECT `title`,`city`,`address`,`description`,`contact`,`postdate`from land union SELECT `title`,`city`,`address`,`description`,`contact`,`postdate`from house union SELECT `title`,`city`,`address`,`description`,`contact`,`postdate`from vechicle union SELECT `title`,`city`,`address`,`description`,`contact`,`postdate`from mobile)A order by postdate hi friends this coding is used to retrievee data from all table in descending order of posedate but it is not working
  6. <?php include("include/connection.php"); $profile= mysql_query("SELECT count( user )FROM (SELECT user FROM computerrepair UNION ALL SELECT user FROM computersale UNION ALL SELECT user FROM hospital UNION ALL SELECT user FROM hotel UNION ALL SELECT user FROM house UNION ALL SELECT user FROM land UNION ALL SELECT user FROM mobile UNION ALL SELECT user FROM theater UNION ALL SELECT user FROM upload UNION ALL SELECT user FROM vechicle) AS a WHERE user = '$login_session'"); $menus=mysql_fetch_array($profile); $noof=$menus['count( user )']; ?> this coding is used to count no of post of user. but it is working on localhost . but i host in online i get this error "Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/a8326388/public_html/profile.php on line 59" line 59 have this coding"$menus=mysql_fetch_array($profile);"
  7. hi friends I am trying to design a user profile page layout . have tried several times to give it a look like how I want it to be but I failed. in this website user can can upload many ads . every ads having suppurate table. how to create user profile and edit function , plz help me, i'm struggle to complete my finial project friends.
  8. <?php if(isset($_POST['update'])){ $comf = $_POST['comf']; include("include/connection.php"); if (!$conn) { die('Could not connect: ' . mysql_error()); } mysql_select_db($database , $conn) or die (mysql_error()); $que1="update customer set active = 1 where randomno = '$comf' " ; $retval = mysql_query( $que1, $conn ); if(! $retval ) { die('Could not update data: ' . mysql_error()); } echo "Updated data successfully\n"; mysql_close($conn); } else { ?> <span style="float:right">Welcome to Addfreeads upload site <?php echo $name ?> </span> <label id="dis"> <h3><?php echo $saved?> </h3></label><br> <form name="frmconfor" id="frmconfor" method="post" action="<?php $_PHP_SELF ?>"> <h2> Enter your Verfication code here</h2> <table width="536" height="265" id="font" > <tr> <td height="62" class="style9"><label>Conformation Code</label></td> <td><input required name="comf" type="text" value="" /></td> </tr> <tr> <td height="118" colspan="2"> <div align="center"> <input name="update" type="submit" id="update" value="Update"> </div></td> </tr> </table> </form> <?php } ?> </center> i change coding like this but update not working
  9. hi friends how retrieve data in current data update to retrieve from the database from all table in one page how is possible i know to retrieve data from one table. only plz guide me
  10. hi this coding to showing error but update not working <?php if(isset($_POST['update'])){ $comf = $_POST['comf']; include("include/connection.php"); if (!$conn) { die('Could not connect: ' . mysql_error()); } mysql_select_db($database , $conn) or die (mysql_error()); $que1="update customer set active = 1 where randomno ='$comf' " ; mysql_select_db('vas'); $retval = mysql_query( $que1, $conn ); if(! $retval ) { die('Could not update data: ' . mysql_error()); } echo "Updated data successfully\n"; mysql_close($conn); } else { ?> <label id="dis"> <h3><?php echo $saved?> </h3></label><br> <form name="frmconfor" id="frmconfor" method="post" action="<?php $_PHP_SELF ?>"> <table width="536" height="265" id="font" > <tr> <td height="62" class="style9"><label>Conformation Code</label></td> <td><input required name="comf" type="text" value="" /></td> </tr> <tr> <td height="118" colspan="2"> <div align="center"> <input name="update" type="submit" id="update" value="Update"> </div></td> </tr> </table> </form> <?php } ?> </center> it show the "update successfuly "message but no change in database
  11. hi friends i have the error in update coding plz help me to solve this problem <?php if($_POST['comf'] != ''){ /*$name = $_POST['name']; */ $comf = $_POST['comf']; include("include/connection.php"); if (!$conn) { die('Could not connect: ' . mysql_error()); } mysql_select_db($database , $conn) or die (mysql_error()); /* $result = "UPDATE customer SET active = 1 WHERE randomno='$comf' "; $que=mysqli_query($r)or die(mysql_error()); $que=mysql_query("select active from customer where user='$name'"); if($que) {*/ $que1=mysql_query($conn,"UPDATE customer SET active = 1 WHERE randomno ='$comf' ") ; if (!$que1 ){ die("Database query failed: ". mysql_error()); } else { /*$saved= "Error in conformation code please retype"; */ $saved= "Thank you to Activate Your Account "; } } ?> <label id="dis"> <h3><?php echo $saved?> </h3></label><br> <form name="frmconfor" id="frmconfor" method="post" action="comformation.php"> <table width="536" height="265" id="font" > <!-- <tr> <td height="62" class="style9"><label>UserName</label></td> <td><input required name="name" type="text" value="" /></td> </tr>--> <tr> <td height="62" class="style9"><label>Conformation Code</label></td> <td><input required name="comf" type="text" value="" /></td> </tr> <tr> <td height="118" colspan="2"> <div align="center"> <input name="submit" type="submit" value="submit"/> </div></td> </tr> </table> </form></center>
×
×
  • Create New...

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.