1,741 Posted Topics

Member Avatar for Vai

[quote] <?php if (level == "1") { include('page_1.php'); } else if (level == "2") { include('page_2.php'); } else if (level == "3") { include('page_3.php'); } ?> [/quote] Shouldn't level be $level ?

Member Avatar for somedude3488
0
176
Member Avatar for big24fan
Member Avatar for ruman_eee

first of all, what is shorting a table ? secondly, what are containers ? Sorry for my ignorance, I didn't understand your question.

Member Avatar for rickarro
0
399
Member Avatar for isomillennium

[code=php] $query = "select * from table where home_phone like '%516%' OR work_phone like '%516%' OR mobile_phone like '%516%'"; [/code]

Member Avatar for nav33n
0
114
Member Avatar for kevin wood

[url=http://dev.mysql.com/doc/refman/5.0/en/truncate.html] Truncate [/url] is used to delete all the records from the table. You should use [url=http://dev.mysql.com/doc/refman/5.0/en/delete.html] delete [/url] with a condition to delete single record.

Member Avatar for nav33n
0
60
Member Avatar for almualim
Member Avatar for shadiadiph

[quote]echo'<input name="tradeaid" type="hidden" id="tradeaid" value="<?=tradeaid?>">'; echo'<input name="mtitle" type="hidden" id="mtitle" value="<?=mtitle?>">'; echo'<input name="nmain" type="hidden" id="nmain" value="<?=nmain?>">'; [/quote] missing $ in the values.

Member Avatar for nav33n
0
112
Member Avatar for OmniX

Heh.. maybe "c" and "d" are varchar fields and the rest are integer fields ? Simplest way to debug this problem is to print out the query and see what does it have at the runtime. Then execute it in phpmyadmin or mysql console. Doing so, you will know where …

Member Avatar for OmniX
0
92
Member Avatar for OmniX
Member Avatar for m_shanak

[quote] like this web site [url]http://www.aljazeera.net/NR/exeres/F...7EA9DAD30F.htm[/url] [/quote] aljazeera ! :icon_eek: Anyway, [url]http://www.quackit.com/html/codes/html_marquee_code.cfm[/url] might help !

Member Avatar for nav33n
0
274
Member Avatar for servis

Hmm.. Does it give any error ? print out the query and see whats being passed as values.. [quote] $name=$_POST['name']; //from the name form $q_id=$_GET['id']; [/quote] What method have you specified for the form ? POST or GET ?

Member Avatar for rgviza
0
4K
Member Avatar for Kraai

[quote][root@cayenne /home/kletsker/mysqldump]# mysql kletsker_kletskerk < localhost.sql ERROR 1064 (42000) at line 89499: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''[ quote=&quot;Barend&quot;:3v' at line 1[/quote] I think (and I am not sure) the …

Member Avatar for Kraai
0
542
Member Avatar for OmniX

[QUOTE=OmniX;603933]I have a variable in a variable. I have done this before but it is not working this time. I have it in a for loop so my code is: [code=php] $abc1 = one; $abc2 = two; for($i = 0; $i < 2; $i++) { echo $$abc$i; } [/code] The …

Member Avatar for OmniX
0
127
Member Avatar for jinx_uk_98

Print your query and execute it in mysql console/phpmyadmin.. Also show us the query ..

Member Avatar for nav33n
0
91
Member Avatar for sanch3za

When you submit the page, only those checkboxes which were checked will be submitted. So, you will have the count of checkboxes which are checked, you will have all the checkboxes which were checked. Build your query depending upon those values.

Member Avatar for nav33n
0
81
Member Avatar for twelvetwelve

If "LLL" and "LLNNNN" are the 'standard' format, then you can use strlen to check the string length. If string length is 3, then its usertype1. If its 6, the usertype is 2. Well, this is the simplest way. But if you want to thoroughly check, you can explode the …

Member Avatar for rgviza
0
142
Member Avatar for mrcniceguy

That's strange. Is there any change of version in php/apache ? I can't think of a reason why your script is acting weirdly !

Member Avatar for rgviza
1
289
Member Avatar for maydhyam

Print the update query and see if it executes in phpmyadmin/mysql console. What do you get ? A result or an error ? You can also try [code=php] $result = mysql_query($query,$conn) or die (mysql_error()); This will also give the error message about why the query failed!

Member Avatar for nav33n
0
161
Member Avatar for MDGM

[quote] $querySQL = "insert into people (d_Name, d_Birthday, d_Birthday) values ($Name, $Birthday, $Telephone)"; [/quote] Thats wrong. Wrap values in single quote. ie., [code=php] $querySQL = "insert into people (d_Name, d_Birthday, d_Birthday) values ('$Name', '$Birthday', '$Telephone')"; [/code] Cheers, Nav

Member Avatar for nav33n
0
103
Member Avatar for ceyesuma
Member Avatar for tefflox

Are you getting any error ? The only thing that might be wrong with the query is, not using ' ' while inserting a value to the varchar field. ie., [code=php] $query = "insert into table (col1,col2) values ('test', 'test2')"; [/code]

Member Avatar for nav33n
0
94
Member Avatar for tefflox

Have you got it right already ? While inserting a record to a table, you follow this syntax. [code=php] $sql = "insert into table (column1,column2) values ('$value1','$value2')"; [/code] Its while updating, you use this syntax. [code=php] $sql = "update table set column1='$value1', column2='$value2' where id='$id'"; [/code]

Member Avatar for nav33n
0
154
Member Avatar for trient

Why not use order by clause in your query itself ? [code=php] $query = "select * from table order by colname [asc | desc ]"; [/code] [asc | desc ] is optional. You can sort the records in ascending order or descending order on one or multiple columns. Or, you …

Member Avatar for nav33n
0
114
Member Avatar for mrcniceguy

Basically, you need another table (comments) with columns to store who wrote the comment, on whose profile was the comment written and the comment. (You also may need more columns like date). I hope every user has a unique userid. Store the userids ("from" and "to" ) and comment in …

Member Avatar for nav33n
0
265
Member Avatar for brow51

The above query doesn't work because, it will search for the record where shape is like "$searchshapeone" AND again, like, "$searchshapetwo". It will work only if there is a record in the database with shape like both $searchshapeone and $searchshapetwo. For example, If there is a record in the table …

Member Avatar for brow51
0
88
Member Avatar for kevin wood

:) remove @ and check if it throws any error. You are supposed to delete the file with the extension !

Member Avatar for amigura
0
212
Member Avatar for OmniX

As you have already said it yourself, you don't have to explicitly declare a variable as an array to use it like an array. You can simply use $var[] = "value"; This will treat $var as an array. But, its always a good practice to initialize a variable before using …

Member Avatar for OmniX
0
122
Member Avatar for anandbabukumar

You can do it in 2 ways. Configure a cron job to run everyday at a certain time and send out mails if there are any records for that particular date. The other way is to write a script and execute it manually everyday.

Member Avatar for nav33n
0
121
Member Avatar for almualim

This has been discussed so many times. Either use ajax or this way. In the first dropdown list, list all the states. Have an onchange event to submit the form for the 1st dropdown list. When a user selects an option from the 1st dropdown list, onchange event will be …

Member Avatar for nav33n
0
102
Member Avatar for OmniX

I said it in the other thread, have an onchange event to submit the page when you select a value from the dropdown list. When the page is submitted, you can know which option was selected from the dropdown list. ($val = $_POST['dropdownlistname']; ) Then query the table with this …

Member Avatar for nav33n
0
196
Member Avatar for maui_mallard

[QUOTE=jasimp;568624]This would make an interesting game. Counting our post count ;) 2602[/QUOTE] lol..That would be an infinite loop. Everytime we post our 'post count', it will be increased by 1 !

Member Avatar for jbennet
2
311
Member Avatar for kevin wood

Yep ! <head> tag is the right place to put meta tags. I haven't come across caching problem, but maybe you can use this. [code=php] <?php header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past ?> [/code] Source: [url]http://nl2.php.net/header[/url] Ex. 2

Member Avatar for kevin wood
0
261
Member Avatar for allen.jes

You can find anything on google ! Well, Just install eclipse and install this plugin.. [url]http://sourceforge.net/project/showfiles.php?group_id=57621[/url]

Member Avatar for nav33n
0
90
Member Avatar for shadiadiph

Check if the number is greater than 0. If it is, then show it in green and negative in red. :-/ What is the problem ?

Member Avatar for nav33n
0
41
Member Avatar for Icetigris

[quote]list($ngclasses) = mysql_fetch_array($result);[/quote] is wrong. It will assign the 0th index of the array fetched by $result to a variable $ngclasses. If you want $ngclasses to be an array, don't use list. Well, here is more on list. [url]http://nl2.php.net/manual/en/function.list.php[/url]

Member Avatar for nav33n
0
138
Member Avatar for almualim

[code=php] <?php //page1.php session_start(); $_SESSION['number'] = 10; header("Location: page2.php"); ?> [/code] and [code=php] <?php //page2.php session_start(); echo"number= ".$_SESSION['number']; ?> [/code] [quote]If you want your script to work regardless of register_globals, you need to instead use the $_SESSION array as $_SESSION entries are automatically registered. If your script uses session_register(), it …

Member Avatar for almualim
0
87
Member Avatar for Abbigail
Re: Talk

[QUOTE=Abbigail;576339]so your the queen[/QUOTE] Yep! Daniweb kingdom is ruled by a queen ;)

Member Avatar for GrimJack
0
112
Member Avatar for dmanw100

Writing data to a file is very simple. Open a file with different modes using fopen. Write contents to it using fwrite. Then close the file. [url]http://nl.php.net/manual/en/function.fopen.php[/url] . I dont understand what exactly you mean by enable the form to upload a file to my server. Isn't file uploading enabled …

Member Avatar for nav33n
0
106
Member Avatar for tanha
Member Avatar for almualim

You can pass variables from 1 page to another through URL (ie., GET method), through forms (ie., POST method), by using Sessions or by using Cookies. [url=http://www.w3schools.com/PHP/php_get.asp] get method [/url] , [url=http://www.w3schools.com/PHP/php_post.asp] post method [/url] , [url=http://www.w3schools.com/PHP/php_sessions.asp] sessions [/url] and [url=http://www.w3schools.com/PHP/php_cookies.asp] cookies [/url] !

Member Avatar for nav33n
0
58
Member Avatar for antwan1986

[quote]ust off the top of my head I'm assuming the addslashes function will take nasty characters like " and add a slash in front of them (which is used for cleaning a variable to be INPUT into the database?) and then stripslashes is to be used when they come back …

Member Avatar for Will Gresham
0
123
Member Avatar for jasme
Member Avatar for dottomm

[code=php] $query = "select * from table where AuthorFirstName like '%$searchstring%' or AuthorLastName like '%$searchstring%'"; [/code] This will look for $searchstring in both AuthorFirstName and AuthorLastName fields. :) I hope thats what you want !

Member Avatar for dottomm
0
77
Member Avatar for Visualogic
Member Avatar for trix
Member Avatar for Asat232
Member Avatar for tkristi

Welcome to Daniweb ! Good luck with your friend's problem :)

Member Avatar for Serunson
0
113
Member Avatar for DAVE89
Member Avatar for minutefix22
Member Avatar for Techwriter10

The End.