370 Posted Topics

Member Avatar for zacharysr

Your queries are wrong - you should be using **=** NOT **LIKE** when selecting by matching id (or any other data). LIKE is for finding similar data. With regard to selecting one message for each batch of messages: $query = mysql_query("SELECT * FROM `private_messages` WHERE to_id='$ID' AND To_Deleted=0 ORDER BY …

Member Avatar for zacharysr
0
183
Member Avatar for Transcendent

For each value that you want to check: $errors = 0; $error_msg = ''; if (!isset($_POST['fname']) || empty ($_POST['fname']))) { $errors++: $error_msg = 'Errors Text'; } // And so on for each posted field you want to check and then echo out the errors in the page if ($errors ==0) …

Member Avatar for almostbob
0
191
Member Avatar for feblioz

Your centre image needs a left and right margin and your right div needs to come before your center div in the html. Have you checked all your widths and padding aren't totalling to wider than the containing div?

Member Avatar for feblioz
0
112
Member Avatar for AirmanTheGreat

It is fairly simple. * Check the form has been posted * Check the content isn't empty * Display/echo the comment And here is the code to do it: <?php if(isset($_POST['content'] && !empty($_POST['content'])) { echo $_POST['content']; } ?> Put this code within the page where you want the comment to …

Member Avatar for AirmanTheGreat
0
135
Member Avatar for Behseini
Member Avatar for simplypixie

I am using jQuery and Ajax to add items to a shopping cart and in all areas of the site apart from one it works fine and I cannot for the life of me work out why this one area isn't working. The form code (which is the same as …

Member Avatar for simplypixie
0
201
Member Avatar for ebanbury

You need to check if the posted data has a value and if so if it equals the value in the menu then if it does, mark as selected: <option value="<?php echo $row_rs_condo['condo_name']?>" <?php if (!empty($_POST['condo_nm']) && $_POST['condo_nm'] == $row_rs_condo['condo_name']) { echo 'selected'; } ?>><?php echo $row_rs_condo['condo_name']?></option>

Member Avatar for ebanbury
0
717
Member Avatar for gsique

It is not ajax you need to do what you are looking for it is plain JavaScript or jQuery. In it's most basic form just use an alert

Member Avatar for simplypixie
0
52
Member Avatar for laura301019
Member Avatar for phoenix_2000
0
174
Member Avatar for simplypixie

I used to be able to select which forums I received through my RSS feed and since the changes to the site my RSS feed stopped working so I hvae re-subscribed but it appears that I now have to receive all new posts from all forums meaning I am getting …

Member Avatar for simplypixie
0
107
Member Avatar for simplypixie

I am using jQuery and Ajax for some areas of a site and I cannot for the life of me work out how to only submit the Ajax if the form is valid. For normal jQuery validation I am using jquery.validate.min.js like this: $("#po-login-form").validate(); This works fine. I then have …

Member Avatar for simplypixie
0
211
Member Avatar for gopi17
Member Avatar for gopi17
0
87
Member Avatar for simplypixie

I hope the title means something, I don't really know how to explain what I am trying to do in a few words. I think better with an example. I have a click event to display an enquiry form on a contact page: [CODE]$("#enquiry-form").hide(); $('.enquiry-form').click(function() { $(this).hide(); $('#enquiry-form').fadeIn( 'slow', function() …

Member Avatar for simplypixie
0
918
Member Avatar for kischi
Member Avatar for kischi
0
123
Member Avatar for h2so4_2003
Member Avatar for simplypixie

Can anyone see why my variable $unit_price isn't updating (in fact it isn't even being applied to the session variable) in this code (it must be something simple but I can't see it and is driving me mad). I have tested the posted data and it is being sent through …

Member Avatar for simplypixie
0
148
Member Avatar for baig772

Have you unticked the box in the Settings->discussion to not allow comments (Allow people to post comments on new articles )?

Member Avatar for simplypixie
0
203
Member Avatar for priyadharsinism

Surely the first thing you need to do is set your session to keep the user logged in and then you would just use an if statement to check is logged in before showing the other forms: [CODE]<?php session_start(); extract($_POST); $uname=$_POST['user']; $pwd=$_POST['password']; $con=mysql_connect('localhost','root','') or die('could not connect:'.mysql_error()); mysql_select_db("priya",$con); $result=mysql_query("select * …

Member Avatar for simplypixie
0
82
Member Avatar for dgordon1966

It looks like you are trying to put a space between the 2 variables so you need to use quote marks: [CODE]$body = $name.' '.$number[/CODE]

Member Avatar for simplypixie
0
84
Member Avatar for sikarenpo

You won't get anything as their is no such variable as $row['name']. You need to add the $a variable to the end of your link url (why are you using the name parameter in the link??): [CODE]echo "<a href='viewlink.php?name=".$row['name']."'>". $row['name'] ."</a>". " | " ;[/CODE] And on your receiving page: …

Member Avatar for simplypixie
0
167
Member Avatar for SQLpower

You can't get it from your login page - you need to retrieve it from the database once they have logged in correctly. Everything in your code is relying on the user inputting their year of birth in the login form and posting it through.

Member Avatar for simplypixie
0
317
Member Avatar for bavenbabu
Member Avatar for bavenbabu

In the value of each form field you need to echo the posted data, for example [CODE]<input type="text" name="username" value="<?php if (isset($_POST['username'])) { echo $_POST['username']; } ?>">[/CODE]

Member Avatar for bavenbabu
-1
113
Member Avatar for feblioz
Member Avatar for simplypixie

I am new to Ajax and have only been learning jQuery on and off for a few months so I apologise if this should be simple. I have followed a tutorial to get shopping cart functionality working using PHP, jQuery and Ajax and it is nearly there but I have …

Member Avatar for AleMonteiro
0
198
Member Avatar for gopi17

You have an incorrect $ in your update query and no quote marks around your variable [CODE]$ser_no=$sernum[/CODE] Coorect: [CODE]$sql2="UPDATE $tbl_name SET status='Completed' WHERE ser_no='".$sernum."'";[/CODE]

Member Avatar for gopi17
0
101
Member Avatar for newbie1234

[CODE]SELECT * FROM name WHERE task_my_id NOT IN (SELECT task_my_id FROM subname)[/CODE]

Member Avatar for NinjaMediaD
0
129
Member Avatar for emiola

I am not saying that this is what is causing the problem (though it may be) but you have 2 id's named the same (you can only use one id per page, otherwise it needs to be a class): [CODE]<div id="navdiv"> <!--about us submenu list ends--> <ul id="navdiv">[/CODE]

Member Avatar for simplypixie
0
108
Member Avatar for gopi17

Before you even look at getting the query results as @ardav has mentioned, your query will fail anyway as your form variables are wrong to work with what you are trying to do (you have put the method as get then tried to get the value using post - also …

Member Avatar for gopi17
0
147
Member Avatar for soapyillusion
Member Avatar for zacharysr

Use CSS - for example set the table rows to white with black text and change the odd rows to a balck background with white text (modify to your needs, desired colours) [CODE] tbody tr { background: white; color: black; tbody tr:nth-of-type(odd), .odd { background: black; color: white; }[/CODE] This …

Member Avatar for weekendrockstar
0
303
Member Avatar for anthonyjpv

This might help you work out what you need to do [CODE]if (!is_array($_SESSION['basket'])) { $_SESSION['basket']=array(); } if (is_array($_POST['qty'])) { foreach ($_POST['qty'] as $key=>$quantity) { $quantity=ceil($quantity); if ($quantity==0) { unset($_SESSION['basket'][$key]); } else { $_SESSION['basket'][$key]['qty']=$quantity; } } }[/CODE]

Member Avatar for anthonyjpv
0
108
Member Avatar for 68thorby68

Can you clarify - are you trying to calculate the total weight of multiples of the same item or the total weight of multiple items?

Member Avatar for diafol
0
2K
Member Avatar for haranaboy

You simply need [CODE]Select customerNumber From Table1 Where customerNumber NOT IN (select customerNumber from table2)[/CODE] You don't need to join or select from 2 tables in the main part of your query

Member Avatar for simplypixie
0
220
Member Avatar for mynameisfish.22

Your problem is here [CODE]$rows=mysql_fetch_array($sql3);[/CODE] This should be [CODE]$rows=mysql_fetch_array($result3);[/CODE]

Member Avatar for karthik_ppts
0
198
Member Avatar for simplypixie

I always develop sites using CSS but am aware that tables have their place when displaying tabular data, however I can't decide whether to use CSS or a table to display the products on the home page of a re-design I am doing and just want peoples opinions please (note …

Member Avatar for stultuske
0
145
Member Avatar for Golffor1

Have you checked that you are getting any results from the actual query or tested that the query is working in any way (you can try echoing it as a start)? Your echo of paid_thru should just be [CODE]echo $row['paid_thru'];[/CODE]

Member Avatar for pritaeas
0
91
Member Avatar for weblion
Member Avatar for accra

These conditionals don't make sense [CODE]if($s_veration == $remnder_ver) { echo" <strong>Specific Variation</strong> ought to have a value equal to <strong>Reminder Variation</strong>, please go back and alter your values"; exit(); } elseif($s_veration >= $remnder_ver) { echo" <strong>Specific Variation</strong> ought to have a value grater than <strong>Reminder Variation</strong>, please go back and …

Member Avatar for simplypixie
0
116
Member Avatar for simplypixie

Sorry if the title of this thread doesn't make sense - I didn't know what to write :) I am using jQuery form validation and one of the rules is to check for a valid url. The field isn't required so am just validating formatting. This all works fine but …

Member Avatar for simplypixie
0
609
Member Avatar for kimmi_baby
Member Avatar for John_Betong
0
146
Member Avatar for lastgame2007

There are no leading zeros in auto-incremented ids so you will only ever get MATH 20121 as your code is. If you want to include a zero you will have to put it in [CODE]$b="MATH"."$yr".0."$id";[/CODE]

Member Avatar for diafol
0
246
Member Avatar for simplypixie

I am not sure if this is a server issue as seemed to be working on my testing server but now live on the clients server this issue is arising. The email is generated from a form which includes a file upload in either word or pdf which is saved …

Member Avatar for simplypixie
0
4K
Member Avatar for shielaolid

Your query is incorrect - you cannot have spaces in column names so you need to change the column names in your query to what they actually are in your database, either as all one word or with an underscore between. For example employee_no or employeeno (as I say it …

Member Avatar for kk.fasil
0
426
Member Avatar for davy_yg

Because to display 2 columns next to each other and independent of each other you need to float at least one of them. For example [CODE]#faq1 { float: left; margin: 0 0 0 10px; width: 250px; } #faq2 { margin: -200px 0 0 300px; width: 250px; }[/CODE]

Member Avatar for davy_yg
0
78
Member Avatar for nova37

A few things - firstly you have out your die on the next line, php needs to be on one line, secondly you are running your mysql_query twice and thirdly you are trying to run two queries in your while loop. This should work (unless there are other problems): [CODE]include …

Member Avatar for nova37
0
111
Member Avatar for simplypixie

I have finally got around to utilising jQuery form validation on a new site I am doing the coding for and even though everything is working exactly as it should I need to move one of the error messages to display below rather than to the right as the other …

Member Avatar for Airshow
0
221
Member Avatar for facarroll

phpMyAdmin is just an admin area for MySQL to make working with your database easier and more intuitive so don't get confused that it has anything to do with your website or coding. It is the PHP that will determine how much of your text is displayed so you need …

Member Avatar for simplypixie
0
130
Member Avatar for s0bigg

The most basic method would be to attach their email address to the unsubscribe url and then use $_GET at the unsubscribe page to update your database and then just display a page to them to say the have unsubscribe. Briefly: [CODE]<a href="http://www.domain.com/alert_unsubcribe.php?email={$tt}">Unsubscribe</a>[/CODE] Then at the unsubscribe page: [CODE]if (isset($_GET['email']) …

Member Avatar for diafol
0
1K
Member Avatar for abe08

Undefined index is just a warning, not an error and it is just advising to check if the variable exists or has a value so all you have to do is out an if statement in your code and in your case around the whole php by the look of …

Member Avatar for simplypixie
0
99

The End.