370 Posted Topics

Member Avatar for anthonyjpv

There is no reason why you can't store the admin details in the main database, just make sure you hash the password and use mysql_real_escape_string for any posted data to prevent sql injection. Also ensure your database connection information is kept outside of the public site to protect it.

Member Avatar for chrishea
0
151
Member Avatar for AaronLLF

Do not use session_register, it is deprecated. What do you get if you use [CODE]var_dump($_SESSION);[/CODE]?

Member Avatar for simplypixie
0
258
Member Avatar for daniel36

As ardav says it is a Unix timestamp and if you want to change it into a date format: [CODE]$date = date('Y-m-d', time());[/CODE]

Member Avatar for simplypixie
0
74
Member Avatar for ptara1

[CODE]$strQuery = "SELECT * FROM tablename WHERE column_name LIKE '%Fun%' ORDER BY name"[/CODE] If your table is called database I would highly recommend changing it's name to prevent issues.

Member Avatar for simplypixie
0
123
Member Avatar for azegurb

Remove the float: left; from your center div and set it's left and right margins to match the width of your left and right divs

Member Avatar for simplypixie
0
239
Member Avatar for Azmah

Your image tag isn't closed so will cause errors: [CODE]<a href="http://twitter.com/thirdspaceme" title="Check Out YOURthirdspace Twitter"><img src="http://i.imgur.com/qi1OJ.png" alt="YOURthirdspace" </a>[/CODE] Should be: [CODE]<a href="http://twitter.com/thirdspaceme" title="Check Out YOURthirdspace Twitter"><img src="http://i.imgur.com/qi1OJ.png" alt="YOURthirdspace" /></a>[/CODE]

Member Avatar for Azmah
0
203
Member Avatar for nakresimin

Find the query that inserts the user's data into the database and change the status_code to equal P instead of A. The code you posted is not relevant to what you are asking for help with so I can't be more specific.

Member Avatar for nakresimin
0
115
Member Avatar for virendra_sharma

[CODE]SELECT * FROM table_name WHERE column_name LIKE 'R%' AND colum_name LIKE '%Y'[/CODE]

Member Avatar for pritaeas
0
552
Member Avatar for sirlink99
Member Avatar for sirlink99
0
71
Member Avatar for sanjaypandit

Or use a join [CODE]$memque="select * from tblevent left join member on member.member_id=tbleevent.member where member.member_id=5)";[/CODE] This is assuming your member number in tblevent is the member id in your member table.

Member Avatar for simplypixie
0
159
Member Avatar for killa78

All you javascript and css should be between the <head> tags (well actually they should be in external files that you link to but that is another issue). The place your php include right at the top of the page before any of the HTML. [CODE] <?php include("members.php"); ?> <!DOCTYPE …

Member Avatar for simplypixie
0
238
Member Avatar for vedro-compota

You query is not formatted correctley [CODE]select NAME from TAB1 left join TAB2 on TAB1.ID = TAB2.ID where TAB1.NUMBER= TAB2.NUMBER;[/CODE] Or if you are trying to join with a 3rd table [CODE]select NAME from TAB1 left join TAB2 on TAB1.ID = TAB2.ID LEFT JOIN TAB3 ON TAB3.NUMBER=TAB2.NUMBER where Put Your …

Member Avatar for simplypixie
0
221
Member Avatar for serdas

That is an issue you need to take up with your hosting provider.

Member Avatar for manojsamtani
0
197
Member Avatar for maxxxx
Member Avatar for SamJoe1

You need to learn PHP and / or Javascript depending on where you store the data you want to search

Member Avatar for simplypixie
0
54
Member Avatar for davy_yg

Your path is wrong - it should be a forward slash, not a back slash as in any path to a file. [CODE]include("includes/koneksi.php");[/CODE]

Member Avatar for simplypixie
0
134
Member Avatar for jQueryLover
Member Avatar for jcarbillon

Why are you using php.ini to set permission - you should do that using CHMOD in your file manager.

Member Avatar for jcarbillon
0
108
Member Avatar for BilalAKhan

Why is you query so complex, simplify it to: [CODE] if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form")) { $insertSQL = "INSERT INTO blog (title, specialization, message, email) VALUES ' " . mysql_real_escape_string($_POST['title') . " ', ' " . mysql_real_escape_string($_POST['specialization']) . " ', ' " . mysql_real_escape_string($_POST['words']) . " ', ' " …

Member Avatar for fobos
0
199
Member Avatar for melbahtoast

Quite easy, just ensure you grab the opt_out column value for each user when you view them and echo it out, something like [CODE=php]<?php if ($row['opt_out'] == 0) { echo 'Opted Out'; } ?>[/CODE]

Member Avatar for simplypixie
0
72
Member Avatar for hendroang

Use View Source on your form page to check that there is a value for the hidden id field as $_POST['id'] will work as long as there is a value to post. In fact, where are you getting the value for $id from anyway to use in your query in …

Member Avatar for rotten69
0
200
Member Avatar for ayub05

The first thing I would do is move all your scripts out into external js files and load them into your page rather than having them inline. Then the second thing would be to place them just before the closing body tag so that your page loads before you try …

Member Avatar for ayub05
0
221
Member Avatar for tqmd1

Try these changes: [CODE] body { padding:0; margin:0; } #content { width:500px; height:600px; margin: 0 auto; color:red; background:#e3eeff; padding:10px; border:1px solid green; } [/CODE]

Member Avatar for ba3ati
0
155
Member Avatar for simplypixie

I just thought I would re-iterate something that I have mentioned a few times in my replies to threads on here in that if your code isn't working, one of the first things to do is actually test your query in the database (i.e. through phpMyAdmin). The reason I am …

Member Avatar for rotten69
2
148
Member Avatar for qwertpink

The columns in your query and the syntax error don't match - where is member_type='none' come from?

Member Avatar for simplypixie
0
231
Member Avatar for phpDave

Why not just echo out $_POST['age'] as that is all you are trying to do anyway. Otherwise, if you want to store the age in a session, you need to allocate your posted age to a session variable and to do that you need to do: [CODE=php]session_start(); $_SESSION['age'] = $_POST['age']; …

Member Avatar for phpDave
0
184
Member Avatar for veledrom

Use margin-top with a value of 300px minus top image height, minus bottom image height

Member Avatar for richardtj
0
155
Member Avatar for Octet

Try setting the height of your body to the height of your background image and get rid of the background-size. Though for a set image background I personally would make a wrpper div to fit the body and put the css in their and leave the body to just have …

Member Avatar for richardtj
0
205
Member Avatar for geaclaesson

What format are you expecting to get from your strtotime and what format are you using in your database for the date columns? Also you original date format should be 13/12/2011 not 12/13/2011.

Member Avatar for geaclaesson
0
576
Member Avatar for MitchellJ

You can't have spaces in your column names, so purchaser telephone needs to be something like purchaser_telephone (at the moment you are saying select purchaser.purchaser and then have a random word telephone afterwards)

Member Avatar for MitchellJ
0
3K
Member Avatar for shailu.thakre

You are missing your join functionality (not sure what where clause you want to use or which table dateposted belongs to): [CODE]$sql = "SELECT entries.*, catagories.cat FROM entries INNER JOIN catagories ON entries.cat_id = catagories.id ORDER BY entries.dateposted DESC LIMIT 1;";[/CODE]

Member Avatar for fobos
0
98
Member Avatar for nursayy

Are you saying you only want to display the .51 part of the string 25.51?

Member Avatar for simplypixie
0
33
Member Avatar for zcj125

You are trying to get results from an INSERT query - you also need a SELCT query after your INSERT query to load results into your mysql_fetch_array and while loop [CODE] mysql_query("INSERT INTO book_tbl (title)VALUES('".$_SESSION['title']."') "); $my_query = "SELECT title FROM book_tbl"; $result = mysql_query($my_query) or die(mysql_error()); while($row = mysql_fetch_array($result,$con)) …

Member Avatar for simplypixie
0
325
Member Avatar for furlanut

You could do it in PHP instead (also you have to FROM table in your query which is wrong) [CODE] $query=mysql_query("SELECT * FROM table"); $result=mysql_fetch_array($query); while ($row = $result=mysql_fetch_array($query)) { $datefield = date('d-m-Y', strtotime($row['datefield'])); } [/CODE]

Member Avatar for simplypixie
0
118
Member Avatar for MattNow14

Please show the code in the function and where you are calling/using that function

Member Avatar for simplypixie
0
93
Member Avatar for leechyeah

Could really do with seeing the rest of your code (especially what you are doing before the piece of code you have already posted). However, as a start, you don't need 2 equals signs and you have put a semi-colon in your if statement which is incorrect, so should be …

Member Avatar for leechyeah
0
217
Member Avatar for jerrinfive

If somene orders 1 product: [CODE]mysql_query("UPDATE Product SET Quantity=Quantity-1 WHERE Id='".$id."'");[/CODE] Replace $id with your variable name foe the product id and if someone orders more than 1 of the same product store the total number in a variable like $total and change Quantity-1 to Quantity-'".$total."'

Member Avatar for qazplm114477
0
120
Member Avatar for veledrom

I can't remember which but some older versions of IE don't like PNG images and you need to use a workaround for them (I remember doing this with a couple of sites but it was a couple of years ago so can't remember how) - that may be your problem.

Member Avatar for simplypixie
0
78
Member Avatar for morrisproject

Is there any script on site.php that checks if a user is logged in or logging out that could redirect back to the logout page?

Member Avatar for hakeemtunde
0
130
Member Avatar for harsha.netpem

You need to store the post selection of checkboxes in an array. So you would call your checkboxes all the same name and create an array from those selected. [CODE]name="nameofcheckboxes[value_id]"[/CODE]

Member Avatar for harsha.netpem
0
745
Member Avatar for lastgame2007

You also need your post data in '' and either use {} or '".."' around them: [CODE]$upd="update news set title='".$_POST['title']."',date='".$_POST['date']."',post='".$_POST['post']."' WHERE id = '".$_POST['id']."'";[/CODE]

Member Avatar for simplypixie
0
107
Member Avatar for stanley87

I would store your information in a database - much easier to work with if you want to use the number of clicks for anything in particular. With regard to clicking on the image you would need to use either javascript with an onclick() event to count or send the …

Member Avatar for simplypixie
0
169
Member Avatar for meowbits

I see the problem in Chrome as well. Firstly can you post your css and secondly a great way of checking problems like this is to add temporary borders to your divs/classes so you can see where the overlaps are actually happening.

Member Avatar for Dandello
0
127
Member Avatar for tahirkhanafridi

Also, you should not be using an </img> closing tag - there is no such thing. It should be: [CODE]echo "<div class='images_thumb'><a href='http://pashtoaudio.com/tahir_upload/".$show_img."'><img src='/tahir_upload/".$show_img."' /></a></div>";[/CODE]

Member Avatar for tahirkhanafridi
0
135
Member Avatar for Jfunch

If you want to display one row you need to either change your query to include a WHERE clause rather than selecting all of the records, or select all of the records and then use and IF statement to determine which row you want to display. Using the ID as …

Member Avatar for simplypixie
0
182
Member Avatar for jovypinoy

I presume your problem is that the black background is only applied to the links whereas you want some padding between your link text and the edge of the black background. If this is the case then as you are only applying your black background to the link then what …

Member Avatar for jovypinoy
0
94
Member Avatar for suhnako

As cereal says, you need to actually run the query using mysql_query as follows: [CODE]$sql=mysql_query("SELECT * FROM $question WHERE question=$a"); $query=mysql_fetch_array($sql);[/CODE]

Member Avatar for diafol
0
310
Member Avatar for manc1976

A quick and dirty solution to show you how it can be done: [CODE] <?php $sql = mysql_query("SELECT access_id FROM user WHERE id='".$userid."' LIMIT 1"); $result = mysql_fetch_array($sql); $id = $result['access_id']; $query = mysql_query("SELECT * FROM access"); ?> <select name='access'> <?php while ($accessrow = mysql_fetch_array($query)) { ?> <option value="<?php echo …

Member Avatar for manc1976
0
10K
Member Avatar for garwil

You need to add md5() around all your references to the password that you want to look up in the database, i.e. [CODE]$newpassword = md5(mysql_real_escape_string($_POST['newpassword']));[/CODE]

Member Avatar for garwil
0
2K
Member Avatar for cmps

I am reading a good book at the moment from Sitepoint [URL="http://bit.ly/tpsE7F"]PHP Master[/URL] which is all about OOP (I love the Sitepoint books and their website).

Member Avatar for simplypixie
0
85

The End.