fiddy
Members-
Posts
75 -
Joined
-
Last visited
Never
Everything posted by fiddy
-
Hi, I am in need to develop a web hosting website where users choose their hosting package and buy it(this is fine as we will be storing in DB). When comming to the admin section where the admin has to provide the users requested space with all features, i really wonder , how to do it. Becuse i have not come across one like this earlier. And i also wonder how to search if a domain name is available or not while domain registation. Kindly help me by telling your ideas or correct me if i am wrong some where. Thanks
-
If you are getting a blank page. then there should be problem with the DB connection i guess. It might not show you errors if error reporting is off in your php.ini. Just a Thought...
-
$query = "INSERT INTO `".$school."` ( `name`, `score`) VALUES ( '" . $name1 . "' , '0');"; Pls try this
-
if you add @ before mysql_ query it will suppress the error. I guess there is some thing wrong with your query near 0. try removing the double quotes in 0 and use only single quotes.
-
try like this also echo the $sql and see if the sql is correct $sql=UPDATE ticket SET status='$status',solution='".$solution."' WHERE ticket_id='".$ticketid."'" mysql_query ($sql) or die (mysql_error());
-
refresh items on a page without reloading it? can it be done?
fiddy replied to c_shelswell's topic in PHP Coding Help
I guess you can do this with the help of JAVASCRIPT. -
So this is the problem. <input type="submit" value="submit"> give a name for the submit button <input type="submit" value="submit" name="submit">
-
Sorry thats print_r($_POST);
-
friend can you pls put print_t($_POST); at the top of the page and tell me what you get before cliking close and after clicking close buttom
-
Posting again my friend: HI i guess you no need else part there, becuse when the page loads for the first time the post values will not be there so the else part is working and you are getting that message.
-
How do I retrieve variables passed thru the URL?
fiddy replied to ridiculous's topic in PHP Coding Help
Hope you are getting those values like this $Course_Id=$_GET['Course_Id']; $Course_Begin_Time = $_GET['Course_Begin_Time']; $Instructor_1 = $_GET['Instructor_1']; -
How do I retrieve variables passed thru the URL?
fiddy replied to ridiculous's topic in PHP Coding Help
Can you try this... echo '<div> <a href="course_details_index.php?Course_Id= '.$Course_Id.' &Course_Begin_Time='.$Course_Begin_Time.' &Instructor_1='.$Instructor_1.'"> <img src="media/course_pics/'.$Course_Pic .'" alt="Featured Course Image" border="none" img style="position:absolute; height:300px; width:300px; TOP:0px; LEFT:0px;">[/url] </div>'; -
Hi, can you please tell if you get the message "The ticket is now closed good work!"; after clicking the close button. One more in the HTML i dont find the tags for close . Is that located in some other page. Bit confused in this
-
HI i guess you no need else part there, becuse when the page loads for the first time the post values will not be there so the else part is working and you are getting that message
-
Sorry i cant help more than this from here with out seeing the output or proper files.. All the best
-
if admin_closeticket.php is the same code, it will obviously show the close ticket page only. Please check the DB it its updated. and hope you get the message "The ticket is now closed good work!" Before that please change if(isset($_POST['Submit'])) to if(isset($_POST['submit']))
-
can you pls post the code of admin_closeticket.php. I guess this is the page where you are taken when you click the close button
-
<?php echo $ticketid; ?> -> Does this displays the ticketid after you submit (clicking the close button) if it does not displays add hidden field like this.So that it will POST you ticket id. <table width="60%" border="1" align="center" cellpadding="1" cellspacing="1" bordercolor="#000000"> <form name="form1" method="post" action="admin_closeticket.php"> <input name="status" type="hidden" id="status" value="0"> <input type="hidden" name="ticketid" value="<?=ticketid?>"> <tr> <td nowrap align="right">Solution:</td> <td height="100"><textarea name="solution" id="solution"></textarea></td> </tr> <tr> <td><input type="submit" value="submit"></td> </tr> </form>
-
I guess you are not passing the ticketid while clode(submit). Try having a hidden field which has the name as ticketid and value echo in it. <input type="hidden" name="ticketid" value="<?=ticketid?>">
-
Did you try concatination the variables. like this $query="SELECT * FROM ticket WHERE ticket_id='".$ticketid."'" $res = mysql_query($query); if (mysql_num_rows($res) > 0) { // found a match $sql="UPDATE ticket SET solution='".$solution."' WHERE ticket_id='".$ticketid."'"; Can you pls paste the error if any
-
Can you pls try like this $query="SELECT * FROM ticket WHERE ticket_id='".$ticketid."'" $res = mysql_query($query); if (mysql_num_rows($res) > 0) { // found a match $sql="UPDATE ticket SET solution='".$solution."' WHERE ticket_id='".$ticketid."'";
-
Pls check your query direcly(phpmyadmin) and see how many records you get in result
-
Pls try like this 1. i have removed $row=mysql_fetch_array($mysql_result) which is after mysql_query 2. i have replaced $row!="" with $row=mysql_fetch_array($mysql_result) in while 3 removed $row=mysql_fetch_array($mysql_result) which comes after echo I am not sure this will work. But give a try . And i hope your database has more than one record and the query $query = "SELECT * FROM events WHERE Date >=now() ORDER BY Date ASC"; results in more than one record. <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <?php $hostname = localhost; $username = greenac_Admin; $password = greenac; $conn = mysql_connect($hostname, $username, $password) or die(mysql_error()); $connection = mysql_select_db("greenac_VORNExpo", $conn); $query = "SELECT * FROM events WHERE Date >=now() ORDER BY Date ASC"; $mysql_result=mysql_query($query,$conn); echo "<table border=0 cellpadding=0 cellspacing=0>"; $i=1; while (($row=mysql_fetch_array($mysql_result)) && ($i<=7)) { $date=$row[2]; $day=substr($date,8,2); $month=substr($date,5,2); $year=substr($date,0,4); $date2=$day." - ".$month." - ".$year; $event = $row[1]; echo("<tr><td width=35%>$event</td><td width=25%>$date2</td></tr> "); $i++; } ?> </td> </tr> <tr> <td><font size="2" face="Georgia, Times New Roman, Times, serif"><a href="display_events.php">Click here to view all events and details!</a> </font></td> </tr> </table>
-
try $row=mysql_fetch_array($mysql_result); instead of $row=mysql_fetch_row($mysql_result);
-
If my understanding is correct.. Please user mysql_insert_id() function after you have executed the insert query. This functiom returnes the last inserted ID.