-
Posts
8 -
Joined
-
Last visited
Posts posted by kiqeri
-
-
Hi. Seeing that this site doesn't let users to terminate their account, may I request a magic button to hide our information? I never contribute in any post so I am pretty much useless. I need to change / hide private information.
-
woops I am off topic. byeeee
-
try using <pre> </pre>
it preserves spaces and line breaks
-
Did you mean the form <form id="to-watch"> ?
And is it calling below's javascript function?
$(function() { $('#to-watch').submit(function(event) { event.preventDefault() $(this).hide('fast'); var movie_id_watch = $('#to-watch [name="MOVIE_ID_TO_WATCH"]').val(); var user_id_watch = $('#to-watch [name="USER_ID_TO_WATCH"]').val(); $.ajax({type: 'POST', url: 'to_play_add.php', cache: false, timeout: 10000, data: {to_watch_user_id: user_id_watch, to_watch_movie_id: movie_id_watch}, success: function() { $('#div_show_play').text('Added to your to play list'). append(html).show('fast'); }, error: function() { $('#div_show_play').text('There is a problem').show('fast'); } }); }); });
as far as I know we cannot call function using that way. Sorry if I misunderstood, though.
Guess I'm not helping
-
I don't know if this is going to help or not, but instead of escaping from php a few times for html, why don't you just use echo instead, so the coding will look neat. Just a suggestion if you don't mind.
Is the error said "unexpected $end" ? because you didn't tell the second problem.
I tried to correct it and the error is because of the first 'if' isn't close (the bracket is still open).
<div id="to_play"> <?php if($rank>=1) { include"scripts/connect.php" ; mysql_connect('localhost',$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $userquery_to_play = mysql_query("SELECT * FROM to_watch WHERE (to_watch_movie_id='$title') AND (to_watch_user_id='$loggedinusername')"); if (mysql_num_rows($userquery_to_play) > 0) { $user_to_play = mysql_result($userquery_to_play,$i,"to_watch_user_id"); echo "<div><span class='rulesub'>This is in your to play list</span><br></div>"; } else if($rank>=1) { include"scripts/connect.php" ; mysql_connect('localhost',$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $userquery_in_rating = mysql_query("SELECT * FROM rateing WHERE (title='$title') AND (user_id='$loggedinusername')"); } else { echo "<script type='text/javascript'>"; // your javascript echo "</script>"; echo "<form id='to-watch'>"; echo "<input type='hidden' name='MOVIE_ID_TO_WATCH' value='<?php echo $title; ?>'>"; echo "<input type='hidden' name='USER_ID_TO_WATCH' value='<?php echo $loggedinusername; ?>'>"; echo "<input type='submit' value='Add to my to play list'>"; echo "</form>"; echo "<div id='div_show_play' class='rulesub' align='left'>"; echo "</div>"; } } ?>
sorry if it doesn't help.
-
how is the latest result? Does it giving you all the query from your database?
Maybe it should be this:
$topic = $_Get['id']; $result = mysql_query("SELECT * FROM students WHERE topic LIKE'%$topic%'"); while($row = mysql_fetch_array($result)) { echo "<tr><p>"; echo "<th><p>" . $row['month']." " .$row['datetime']."</p></th>"; echo"<th><p>". $row['topic'] ."</p></th>"; echo "<th><p>" . $row['gender'] . "</p></th>"; echo "<th><p>" . $row['fname'] . " " . $row['lname'] . "</p></th>"; echo "<th ><p>" . $row['id'] . "</p></th>"; echo "</tr>"; echo "</table>";
Because if the $result is $result = mysql_query("SELECT * FROM students)
then the looping will fetch all the array because your $result doesn't have condition.
-
hello, maybe you should add
$term=$_POST['term'];
because when you hit 'search', the keyword you are searching is saved in $_POST['term']
so the $term in your sql instruction is equal to blank, which make it gives you all the result.
Hope it helps : )
Help hide private information
in PHPFreaks.com Website Feedback
Posted
Hi, thanks for the respond.
I've look around for a way to edit the setting but the only information (from the provided link) I can change are email address and password. Is there anyway to change the other information such as birthday?