370 Posted Topics

Member Avatar for eulo

You have this for($i=0;$i<$count;$i++){ But don't seem to have set a value for `$count` anywhere so the is no value to compare `$i` to.

Member Avatar for simplypixie
0
230
Member Avatar for lizetta

You need to order the results in your query: $sql = "SELECT Title, Date, Place, Description FROM Events ORDER BY Date ASC"; Either ASC or DESC depending which order you want them in

Member Avatar for simplypixie
0
261
Member Avatar for geneh23

Once you have done whatever it is you need to do with your posted data (that part of your code isn't shown and you currently have to action specified in your form), just add your values to the url: header('location: your_page.php?post_id={$_POST['post_id}&album_id={$_POST['album_id']}');

Member Avatar for geneh23
0
527
Member Avatar for 417linux

What you are currently doing is trying to find records where year = '2012, 2011, 201, 2009, 2008' and I would think that you don't have a value like that in your database. I presume you are trying to see if a year matches ONE of the years in your …

Member Avatar for 417linux
0
249
Member Avatar for Jakx

I think you need to find a simpler tutorial as there is no need to keep querying your database on every page, just do it once at login and ensure all required data is stored in your session variables as required and then use checks on the session data to …

Member Avatar for simplypixie
0
283
Member Avatar for baig772

Guessing at the id's that link your tables and not knowing the WHERE cluase: "SELECT tbl_project.project_name, tbl_delivarables.deliverables, tbl_employee.employee_name FROM tbl_project INNER JOIN tbl_deliverables ON tbl_deliverables.project_id=tbl_project.project_id INNER JOIN tbl_employees ON tbl_employees.employee_id=tbl_deliverables.employee_id WHERE ........"

Member Avatar for baig772
0
123
Member Avatar for ckarlss0n

Use a join on the same table, something like: SELECT tbl1.*, tbl2.* FROM table_name AS tbl1 INNER JOIN table_name AS tbl2 ON tbl1.a=tble2.b Not tested and a quick example

Member Avatar for diafol
0
238
Member Avatar for bLuEmEzzy

Set a style in you style sheet and apply that. In style sheet: .date-celebrants { font-color: yellow; } And in you HTML/PHP put: echo '<span class="date-celebrants">' .date('M'). ' ' .('Celebrants'). '</span>';

Member Avatar for simplypixie
0
161
Member Avatar for simplypixie

Rather than write a huge list of properties used by a class I want to know if I can dynamically generate them when needed. I have looked and __set and __get but I am not sure how (or if) I use them with what I am trying to do. The …

Member Avatar for simplypixie
0
5K
Member Avatar for mhupadhyay

This is the code I use and run a cron job: backup_tables('user','password','database'); /* backup the db OR just a table */ function backup_tables($user,$pass,$db) { $suffix = date("mdY-Hi"); #Execute the command to create backup sql file exec("mysqldump --user={$user} --password={$pass} --quick --add-drop-table --add-locks --extended-insert --lock-tables --all {$db} > ../db_backups/backup.sql"); #Now zip that …

Member Avatar for simplypixie
0
133
Member Avatar for davy_yg

Generally, undefined variable means that it has no value and it is just a warning, change to this: <?php if (isset($confirmation)) { echo $confirmation; } ?> This should get rid of the warning but doesn't help as to why the variable is empty. Then for your if statement shpould work …

Member Avatar for davy_yg
0
320
Member Avatar for simplypixie

I am not new to OOP I am tidying up a very large site of mine and trying to create a much better structure (more in keeping with the whole point of OOP). I have decided to use mysqli (please don't suggest PDO as I have decided againast it) which …

Member Avatar for simplypixie
0
2K
Member Avatar for PHPuss

Use CSS to set a background colour to rows with errors: tr.error { backround-color: red; } Then check if there is an error and if so, apply the style to your table row (replaces line 22 in your posted code): echo'<tr'; if ($part[2] == 'error') { echo ' class="error"'; } …

Member Avatar for simplypixie
0
169
Member Avatar for nickg21

Formatting on here is no different to any other forum, just type in the box and when you want to display code, hit the Code link, put in the code and click the Insert Code button. As for your problem, try this: SELECT count(*) from Inquiry Inner Join Inquirer on …

Member Avatar for BitBlt
0
739
Member Avatar for debal

Your button should be a submit instead as what you have won't submit your form or post your data. `<input type="submit" id="nw_update" value="NW_Update"/>`

Member Avatar for simplypixie
0
10K
Member Avatar for Riu 2009

I am wondering if your name="type" is causing a conflict as type is used as part of a form elements details. Have you tried changing it to something else and see what happens? Also, are you sure that one of the radio buttons is being selected?

Member Avatar for Riu 2009
0
8K
Member Avatar for andy106

Because you can only access protected properties and methods from the same class or a child class. If you want to access them from outside the class you need to make them public.

Member Avatar for johrocks124
0
3K
Member Avatar for coolsid01

A couple of things: 1. Your are using the variable `$password` but I can't see anywhere above that code that actuallys assigns a value to that variable. 2. You are assigning your query to a variable but not actually running the query anywhere, you don't need a blank space for …

Member Avatar for coolsid01
0
241
Member Avatar for Djmann1013

rotten69 didn't change your code for the OR, you cannot use OR in PHP, only in sql queries. So it should be if($row['banned'] == 1 || $row['banned'] == 2) { header ('location: url'); } You don't need speach marks around numbers/integers as suggested earlier either. Have you echo'd `$row['banned']` to …

Member Avatar for Djmann1013
0
165
Member Avatar for harsha.netpem
Member Avatar for simplypixie
0
147
Member Avatar for bLuEmEzzy

Are you definitely using MD5 in the database (i.e. not SHA1)? Also I would recommend trimming your posted data to ensure there is no white space.

Member Avatar for bLuEmEzzy
0
3K
Member Avatar for Utharan

Firslty, name each radio button the same and then give each one a different value: <input type="radio" name="radio_name" value="radio_value1" /> <input type="radio" name="radio_name" value="radio_value2" /> // And so on Then for the PHP you just need to get the value based on the name: $radio_value = $_POST['radio_name']; Obviously change the …

Member Avatar for Utharan
0
99
Member Avatar for ngocham2001

You will always get those results as you are basing the selection on the name and the name A in the payment table has a value of 3 no matter what records in the order table. So rather than trying to get those results with a query, why not set …

Member Avatar for ngocham2001
0
210
Member Avatar for persianprez

Your button has no value so it will be empty. 2 things: 1. Change your buttons to a submit and remove the javascript: <input type="submit" class="btn" name="submit_yes" value="Yes" /> <input type="submit" class="btn btn-primary active" name="submit_no" value="No" /> Then change your PHP to get the value of the submit: <?php $refresh …

Member Avatar for lps
0
178
Member Avatar for flynismo

You can't use $_REQUEST, $_POST or $_GET in classes, you need to send that information from the page that is getting that information by instantiating the class in that page. Can you post the code where you are using the class and methods.

Member Avatar for mschroeder
0
383
Member Avatar for simplypixie

I have the following script: $('#login-box .forgot-pwd').click(function (e) { e.preventDefault(); $('#login-box #main-login').hide("fast"); $('#login-box .login-error').hide(); $('#login-box #forgot-login').show("fast"); $('#forgot-username').focus(); $('#login-box .forgot-send').click(function (e) { e.preventDefault(); $.ajax({ url: '/login.php', data: $('#login-box form.get-password').serialize() + '&action=forgot', type: 'POST', success: function(html) { if (html == 'success') { $('#login-box #forgot-login').hide("fast"); $('#login-box').append('<p>Your password has been emailed to you</p>'); $('#mask …

Member Avatar for simplypixie
0
293
Member Avatar for veledrom

It really depends how far you want to go with checking for duplicatiomn but if you want to make sure they aren't swapping firstname and last name, you could use this SELECT COUNT(*) FROM users WHERE ((FirstName = UPPER('$textFirstname') AND LastName = UPPER('$textLastname')) OR (FirstName = UPPER('$textLastname') AND LastName = …

Member Avatar for pritaeas
0
96
Member Avatar for nova37

Tray adding `or die(mysql_error())` to the end of your query to see if that helps with finding out what is going wrong: $result = mysql_query("SELECT * FROM table WHERE h_ip ='$r_ip'") or die(mysql_error());

Member Avatar for nova37
0
320
Member Avatar for davidbernardino

Not sure if this would be causing your problem but `<?php echo $PHP_SELF;?>` should be `<?php echo $_SERVER['PHP_SELF'];?>`

Member Avatar for davidbernardino
0
72
Member Avatar for vijayram

Where are you getting the `$profile_records` array information from for the code at the top of the page? I only see it in your code from line 19. Also the code from line 19 has the variable `$profile_record` and not `$profile_records`.

Member Avatar for simplypixie
0
112
Member Avatar for Sabyre

You don't say exactly what your problem is but for one thing you are using mysql_fetch_array twice on your first query (lines 34 and 42) which I am certain will be causing you problems.

Member Avatar for Sabyre
0
122
Member Avatar for hwoarang69

$imagid cannot be set as you are not echoing it. Change to: <a href='deleteimage.php?imgid=<?php echo $row['image_id']; ?>'>Delete</a>

Member Avatar for simplypixie
0
116
Member Avatar for kimmi_baby

Go into your post, hover over te image and click the edit icon. In the edit image pop-up, click advanced and change the link url to what you want it to be.

Member Avatar for simplypixie
0
129
Member Avatar for simplypixie

Can anyone help with this please (I have read a lot and cannot see an issue with what I am doing and it is driving me mad). My css for the @font-face is: @font-face { font-family: 'NotethisRegular'; src: url("fonts/Note_this-webfont.eot"); src: url("fonts/Note_this-webfont.ttf") format('truetype'), url("fonts/Note_this-webfont.svg#NotethisRegular") format('svg'); font-weight: normal; font-style: normal; } The …

Member Avatar for simplypixie
0
200
Member Avatar for divyakrishnan

I am presuming your are allocating a value to your $item variable somewhere above this code. But you have two problems, the first being that if you are going to use the While loop you need to use == not just =: while ($item == current($_POST)) Secondly, you cannot just …

Member Avatar for ko ko
0
2K
Member Avatar for Buppy

Firslty - you should keep your styling separate rather than putting it inline so move all styling into a style sheet. Then all you need to make a gap between your divs is to use padding or margins: // In your stylesheet add a class (name what is relevant to …

Member Avatar for almostbob
0
75
Member Avatar for BenzZz

I am not sure what the : is for but to do what you want, it should be: WHERE message LIKE '."'%$substring%'".';

Member Avatar for simplypixie
0
254
Member Avatar for mig_kapa

phorce is correct but they should be the other way around: <?php endwhile; endif; ?> You are also missing your semi-colon after calling the template_directory

Member Avatar for mig_kapa
0
187
Member Avatar for breakzzzz20

I am not entirely sure what the problem is from your description unless you are referring to the funny A<< and A>> in your button text which is because you haven't used html entities. In your code, replace << with &laquo; and >> with &raquo;

Member Avatar for breakzzzz20
0
407
Member Avatar for nova37

That is because your class btn has been assigned to a (link) in your css and a submit button isn't a link. Just remove the a from a.btn in your stylesheet and that should work.

Member Avatar for nova37
0
229
Member Avatar for realworldmedia

You have no php tags around your code and you are not using speach marks where needed, try this <div class="wrapper pad_bot3"> <?php echo '<figure class="left marg_right1"><img src="'.$row['photourl'].'" alt=""></figure>'; echo '<p class="pad_bot1"><strong class="color2">'.$row['parish'].'</strong></p>'; echo '<p class="pad_bot1"><strong class="color2">'.$row['bedroom'].','.$row['bathroom'].'<br>'; echo ' Price: <span class="color1">'.$row['status'].'</span></strong></p>'; ?> <a href="#" class="button">Read more</a> </div>

Member Avatar for realworldmedia
0
180
Member Avatar for aecha

To add more than one variable to a url string you need to use & index.php?page=view_user.php&ref1=

Member Avatar for aecha
0
133
Member Avatar for nexocentric

Where are you calling your function createNavigationMenu in the first instance and what paremters are you sending through as $isSubMenu will only be set to false if you are not passing through a setting for the function parameter as this may be where your problem is coming from?

Member Avatar for nexocentric
0
574
Member Avatar for jj.amonit

Not sure, but try something like (basically you need to use remove as well) this: $('#dialog').dialog({ modal: true, hide: "explode", show: "blind", close: function(event, ui) { $(this).dialog('destroy').remove(); } });

Member Avatar for fobos
0
3K
Member Avatar for heshanm

This is telling you that the variable in your query is empty. Try echoing out the query to make sure it is as expected and then run what is echo'd out directly in phpMyAdmin to see if you get any errors there as well. $query="select amount_id from payment where admission_no='$admission_no'"; …

Member Avatar for Venom Rush
0
122
Member Avatar for drjay1627

The holder won't increase when the content of a floated div inside it increases in content as floating a div takes it out of the containing div. What you need to do is create a class to clear the floats and place this after your floated elements inside the holder …

Member Avatar for gabrielcastillo
0
159
Member Avatar for gilgil2

Or you can just put your `$_POST['band']` variable into your query without assigning it to another variable. Either way I would also suggest putting the variable in speech marks to prevent problems: $result = mysql_query("SELECT * FROM gigs WHERE band LIKE '%'".$band."'%'"); You can also tidy up your if statement …

Member Avatar for diafol
0
143
Member Avatar for shar88

I would add them to an array and either store that array in a session or pass it as a variable from page to page.

Member Avatar for simplypixie
0
450
Member Avatar for prushton1

This is wrong if (!(isset($pagenum))) Should be if (!isset($pagenum)) You are missing the OFFSET in your query, your query should be in this format: mysql_query("SELECT table_columns FROM table_name WHERE conditional ORDER BY column_name ASC_or_DESC LIMIT num_rows_per_page OFFSET curr_page_number_*_num_rows_per_page");

Member Avatar for simplypixie
0
186
Member Avatar for vergil1983

A few things 1. Why are you using an onclick function to submit your form when there is no need as you are not doing anything complex, just submitting it? 2. If you are using onclick instead of submit you need to completely remove the action= from your form tag …

Member Avatar for simplypixie
0
787

The End.