Posts
 
Reputation
Joined
Last Seen
Ranked #254
Strength to Increase Rep
+10
Strength to Decrease Rep
-2
90% Quality Score
Upvotes Received
92
Posts with Upvotes
79
Upvoting Members
50
Downvotes Received
8
Posts with Downvotes
6
Downvoting Members
8
23 Commented Posts
6 Endorsements
Ranked #299
Ranked #174
~276.01K People Reached
Favorite Tags
Member Avatar for vindyauwu

You aren't getting the data from your query. mysql_num_rows returns exactly what it says, the number of rows returned from a query - therefore it cannot be equal to a strings, only an integer. Change to: $query = mysql_fetch_array($login); // Check username and password match if ($query['user'] == 'admin') { …

Member Avatar for VINITHAPRIYA R
0
36K
Member Avatar for Maideen

I am consfused as you say you want to update table 2 from table 1 but your query that isn't working is updating table 1 from table 1. Please clarify which table it is you need to update

Member Avatar for simplypixie
0
210
Member Avatar for Poonam Jadav

On the receiving page you need to use[CODE]$id = $_GET['id'];[/CODE] not $_POST as you are not posting the data (you would be if using a form to pass the data) you are sending in a URL and therefore need to use $_GET.

Member Avatar for pzuurveen
2
43K
Member Avatar for manc1976

Simply like this: [CODE]<?php $query="SELECT location,id FROM area"; $result = mysql_query ($query); echo '<select name="location_id">'; echo '<option value="">Please Select..</option>'; while($nt=mysql_fetch_array($result)){ echo '<option value="'.$nt['id'].'">'.$nt['location'].'</option>'; } echo '</select>'; ?>[/CODE]

Member Avatar for Syed_2
0
3K
Member Avatar for simplypixie

Please look at my jsfiddle here - http://jsfiddle.net/ftuZ5/ . I know why the links won't work as the relative positioning I have used to create the link / menu backgrounds I want is covering the a element but I can't work out how to resolve the issue (having tried relative …

Member Avatar for simplypixie
0
195
Member Avatar for McLaren

If each of your right and left floats have set widths, then add the appropriate margins to the center div (i.e. if both floats are 200px wide then set the left and right margins on your center div to 200px each)

Member Avatar for clintmannar
0
3K
Member Avatar for judah.raine

In lines 229 and 235 you have forgotten the `<?php endif; ?>` (added below) <div id="excerpt"> <div> <p><span id="label"><b>Excerpt:</b></span> <div style="float:left;"> <div><?php if(!empty($item->fields_by_id[32])):?><?php echo $item->fields_by_id[32]->result; ?><?php endif; ?></div> </div> </div> </div> <div id="memreview"> <div><?php if(!empty($item->fields_by_id[14])):?><?php echo $item->fields_by_id[14]->result; ?><?php endif; ?></div> </div> I have also noticed that you have some extra …

Member Avatar for Dani
0
269
Member Avatar for sql_1

Where is the value of $semesterid being set and why are you repeating the same code twice for your query and dropdown?

Member Avatar for sql_1
0
1K
Member Avatar for navneil

Well you will do as you are selecting all records and echoing them out through one loop all in the same unordered list. What exactly are you trying to do?

Member Avatar for broj1
0
243
Member Avatar for mgn2683

It is your container div causing the problem and it is not required - remove it and the extra space will disappear. This then leaves the problem that if the content is too little the fotter will have a gap underneath it but that can be fixed by using position: …

Member Avatar for mildred2013
0
135
Member Avatar for isaac.iji.5

Well it is difficult to answer properly without seeing what you have done so far but I would have a friends table that will hold the ids of users with related ids of their friends and then you can just cross reference that table to match friend ids with user …

Member Avatar for isaac.iji.5
0
271
Member Avatar for jacob21

Are you sure `$_REQUEST['newstype']` actually has a value? Is the text of your echo being displayed? How are you sending through 'newstype' (post or get)?

Member Avatar for diafol
0
259
Member Avatar for vbdotnetlover

The code in your page <?php if (isset($_POST['button1'])){ $name=$_POST['text1']; }else{ $name=""; } if ($name) { echo 'My name is ' . $name; }else{ echo 'No name entered'; } ?> is different to the code that you have posted below and incorrect to only run the echo if the form has …

Member Avatar for vbdotnetlover
0
136
Member Avatar for Linddha

You can use += which will add onto each previosu total through a loop $koinp=mysql_num_rows($coinp); $total = 0; // Put this is to define the variable and set the initial amount to 0 while($oinp=mysql_fetch_array($coinp)){ $comme=mysql_num_rows($comentar); // echo" ($comme) </br>"; $total += $comme; // Add each value of $comme to the …

Member Avatar for urtrivedi
0
201
Member Avatar for karen.frias0316

Just wrap your code in an if statement and if there is a file it will run the image processing, otherwise it will just ignore it (then load your default image on the front end) if (!empty($_FILES)) { } In fact this should replace your current if statement

Member Avatar for karen.frias0316
0
857
Member Avatar for simplypixie

I am using tinymce on a cms and I want to be able to have a dropdown menu of all pages on the site (stored in a db) to choose from when adding a link but all I am getting is an emtpy set of values. I am using the …

Member Avatar for simplypixie
0
895
Member Avatar for tqmd1
Member Avatar for Bachu
0
184
Member Avatar for WebCat999
Member Avatar for Eagle.Avik

So what problem do you have now (you don't say)? Also you don't need to declare an array of variables in your execute statement unless you are using placeholders, just use execute()

Member Avatar for simplypixie
0
912
Member Avatar for chrisschristou

Set all images to 100% width with a max-width specific to images in specific divs to make sure they don't get bigger than the orginal img { width: 100%; height: auto; }

Member Avatar for simplypixie
0
114
Member Avatar for simplypixie

This is driving me insane - I have certain links that are re-written on a site that work perfectly fine (and I am not new to re-wring urls) but have just found that some others aren't and I cannot fathom out why. What works: // The link <a href="/shop/<?php echo …

Member Avatar for simplypixie
0
267
Member Avatar for davy_yg

As drjohn says, just [CODE]text-align:center;[/CODE] on your containing banner div that you already have in place and remove all css for the images as it won't then be required unless you want to add margins or padding around them.

Member Avatar for aaaaabeecd
0
135
Member Avatar for garyjohnson

I would re-structure to just query on the user and then compare the returned ids to your array of ids $secondArray = array(); //$ids = join(',', $IdArray); $query = "SELECT * FROM test WHERE user = '$user'"; $results = mysql_query($query); while($row = mysql_fetch_array($results)){ if (in_array($row['id'], $IdArray)) { $secondArray[] = "YES"; …

Member Avatar for broj1
0
413
Member Avatar for PixelatedKarma

Passing as an array is exactly what you should be doing. Not sure whee you have heard that passing form data as an array is wrong as that is the only way to pass the data if you have multiple fields of the same 'type'.

Member Avatar for PixelatedKarma
0
288
Member Avatar for johmny

Along with a load of bloated, unnecessary code - oh if only it was just used for blogs as it was intended!

Member Avatar for ACRDepos
0
126
Member Avatar for gogs85

You shouldn't be using session_register as it is a depricated function. Just assign your session vaiables like $_SESSION['email'] = $email; $_SESSION['login_pass'] = $login_pass; And then check the session is there as @phorce said by using if(!isset($_SESSION['email'])) { } However there are also two other points I would like to make: …

Member Avatar for gogs85
0
337
Member Avatar for chrisschristou
Member Avatar for robin.aditta1

You are looking at the wrong query - the error message states you have an error near 'ORDER BY m_date DESC' in your original post and then the next error is near 'ORDER BY percent DESC' in a later reply but the query you have posted has no ORDER BY …

Member Avatar for simplypixie
0
671
Member Avatar for simplypixie

As usual I am having a love hate relationship with jQuery and Ajax :) I have a PHP file that uploads and resizes and image and stores the data in the database, which on its own works fine. I am now trying to do this through a jquery modal/dialog box …

Member Avatar for simplypixie
0
330
Member Avatar for NoMansLand_MFGC

This all looks unnecesarily complicated (plus you don't show your db queries so we can see where the problem may be occuring) - have you looked at using PHP's [DateTime](http://php.net/manual/en/book.datetime.php) class / functions?

Member Avatar for diafol
0
293