Search Results

Showing results 1 to 40 of 112
Search took 0.01 seconds.
Search: Posts Made By: pritaeas ; Forum: PHP and child forums
Forum: PHP 2 Days Ago
Replies: 5
Views: 159
Posted By pritaeas
The first notice you get is because $_POST[dtext] may not have been set. This will result in an invalid query, after which it will fail, and put false in $result.

Since $result is false (because...
Forum: PHP 2 Days Ago
Replies: 3
Views: 189
Posted By pritaeas
Then you could use this one:

SELECT * FROM agents WHERE (sponsor = '1' or sponsor = '2' or sponsor = '3') LIMIT 1
Forum: PHP 3 Days Ago
Replies: 14
Views: 281
Posted By pritaeas
Got your PM too, but the question was already nicely answered.
Forum: PHP 3 Days Ago
Replies: 14
Views: 281
Posted By pritaeas
I suggest you read this first: http://www.daniweb.com/forums/announcement124-2.html

Come up with an idea. Then, if you have problems, show us your code and explain the problem.
Forum: PHP 3 Days Ago
Replies: 4
Views: 143
Posted By pritaeas
Try this:


<?php
mysql_connect(HOST,USER,PASS);
@mysql_select_db("db303278079") or die( "Unable to select database");

$query="select * from ".RECORDS." WHERE area='manchester' order...
Forum: PHP 3 Days Ago
Replies: 4
Views: 143
Posted By pritaeas
The if ($count) is inside the for loop, which doesn't get executed if there are no records found. Place the if ($count == 0) outside the for loop to fix it.
Forum: PHP 3 Days Ago
Replies: 3
Views: 189
Posted By pritaeas
The LIMIT always applies to the end result of the query. Even without the limit, the count(*) will only return 1 result row.

I'm not sure of what you try to achieve. If you want the count per...
Forum: PHP 11 Days Ago
Replies: 4
Views: 207
Posted By pritaeas
The mysql_fetch_array function does this. It retrieves the table columns by id AND by name. You can use mysql_fetch_row instead.
Forum: PHP 17 Days Ago
Replies: 7
Views: 330
Posted By pritaeas
Are you perhaps using the escape twice before storing the value in the db ? The slash shouldn't be in there.
Forum: PHP 18 Days Ago
Replies: 7
Views: 330
Posted By pritaeas
The mysql_real_escape_string is intented to be used when you include a variable into an sql statement. You are just displaying the result. That is why you are shown a value with the extra slashes.
...
Forum: PHP 18 Days Ago
Replies: 4
Solved: header problem
Views: 215
Posted By pritaeas
There may be something in session.php or config.php that adds spaces to the output (or more).
Forum: PHP 24 Days Ago
Replies: 8
Views: 378
Posted By pritaeas
Why not let the browser handle it:


<?php
echo '<a href="mailto:' . $row_master_view['email'] . '">' . $row_master_view['email'] . '</a>';
?>
Forum: PHP 29 Days Ago
Replies: 8
Views: 235
Posted By pritaeas
Then it must be this new page, something has to be missing, if all others work.

Before the while, add: die(mysql_error()); to see if and why the query fails.
Forum: PHP 29 Days Ago
Replies: 8
Views: 235
Posted By pritaeas
Check if the connection to the database is successful (in code).
Forum: PHP 29 Days Ago
Replies: 8
Views: 235
Posted By pritaeas
What happens when the query fails, and $result is false, instead of a resource ? My guess is that there is an error in the query or it's not connecting correctly.
Forum: PHP Oct 23rd, 2009
Replies: 4
Views: 408
Posted By pritaeas
$id is not set. Put the following on line 5:

$id = $_GET['id'];
Forum: PHP Oct 23rd, 2009
Replies: 4
Views: 530
Posted By pritaeas
If you really need to do this this way, then creating a msqli_multi_query could help. That way the server gets all queries at once, and does not need to handle each query separately.
...
Forum: PHP Oct 17th, 2009
Replies: 6
Views: 581
Posted By pritaeas
$members->start();

This requires that $members is an object, created with:

$members = new <classname>;

Where <classname> is the class you want it to be (probably db).
Forum: PHP Oct 15th, 2009
Replies: 1
Solved: constant
Views: 228
Posted By pritaeas
<?php
include_once(DIR_WS_LANGUAGES . $_SESSION['language'] . '.php') ;
?>
Forum: PHP Oct 13th, 2009
Replies: 5
Views: 320
Posted By pritaeas
You could add

AddType application/x-httpd-php .html

to your htaccess files. Then, html files will be parsed just the same as php files. So you can add php code to the html files.
Forum: PHP Oct 13th, 2009
Replies: 2
Views: 268
Posted By pritaeas
Insert this at the top of both pages:

if (! session_id())
session_start();


Then you can use

$_SESSION['first'] = $_POST['first'];
Forum: PHP Oct 8th, 2009
Replies: 6
Views: 273
Posted By pritaeas
Check this line: header("Content-length: " . filesize( $getfile ));

Maybe filesize cannot find your file and returns 0. You may have to use $filepath instead. I think you need to output the file...
Forum: PHP Oct 7th, 2009
Replies: 8
Views: 425
Posted By pritaeas
His example only contains '128px', post #4 splits that fine.

Once you introduce other chars into the equasion, I think it's best to remove them first. I'll wait for feedback first from baltazar,...
Forum: PHP Oct 7th, 2009
Replies: 8
Views: 425
Posted By pritaeas
$test = preg_split('/px|em|pt|%/',$str,-1, PREG_SPLIT_OFFSET_CAPTURE);


You should put your regex between slashes. Is this what you want ? Perhaps you want to split also before a number ?

...
Forum: PHP Oct 7th, 2009
Replies: 8
Views: 425
Posted By pritaeas
He wants to split his string on 'px' or 'em' or 'pt' or '%'
I made it a backreference, but it is probably not necessary.

The code should be:

$test = preg_split('/px|em|pt|%/', '128px', -1,...
Forum: PHP Oct 7th, 2009
Replies: 8
Views: 425
Posted By pritaeas
(px|em|pt|%)
Forum: PHP Oct 5th, 2009
Replies: 6
Views: 214
Posted By pritaeas
sorry, remove the echo before the if...
Forum: PHP Oct 5th, 2009
Replies: 1
Views: 171
Posted By pritaeas
It shouldnt be a problem. Try:

mysql_query(...) or die(mysql_error());

to see why the query fails.
Forum: PHP Oct 5th, 2009
Replies: 2
Views: 191
Posted By pritaeas
$this_banner[dsub] is probably returning a string instead of an integer. If you're sure it is an integer you can try:

(int)$this_banner[dsub]

otherwise, check it's contents.
Forum: PHP Oct 5th, 2009
Replies: 6
Views: 214
Posted By pritaeas
The echo is the 13th option. Try this:


<select name="month" id="month">
<option value="1" <?php echo if ($this_month == 'Jan') echo 'selected'; ?>>Jan</option>
<option value="2" <?php echo...
Forum: PHP Oct 5th, 2009
Replies: 6
Views: 214
Posted By pritaeas
Show us your code.
Forum: PHP Oct 1st, 2009
Replies: 2
Views: 314
Posted By pritaeas
TinyMCE has a plugin to handle images:

http://tinymce.moxiecode.com/plugins_imagemanager.php
Forum: PHP Sep 30th, 2009
Replies: 9
Views: 349
Posted By pritaeas
try using & #35 ; instead (without the spaces),

see:

http://www.ascii.cl/htmlcodes.htm
Forum: PHP Sep 18th, 2009
Replies: 7
Views: 327
Posted By pritaeas
$sql = ("SELECT * FROM persons1 WHERE Firstname=' . $post_Firstname . '");

should be

$sql = ("SELECT * FROM persons1 WHERE Firstname='$post_Firstname'");
Forum: PHP Sep 17th, 2009
Replies: 7
Views: 327
Posted By pritaeas
Add the line:

$Firstname = $_POST['Firstname'];

before the line with mysql_select_db.
Forum: PHP Sep 17th, 2009
Replies: 2
Views: 277
Posted By pritaeas
Replace

$res = mysql_query($sql) or die("cud not add record");

with

$res = mysql_query($sql) or die(mysql_error());

and paste the error message too.
Forum: PHP Sep 16th, 2009
Replies: 7
Views: 279
Posted By pritaeas
Not sure, if I put this:

<button type="button" onclick="window.location='bookview.php?id=1&hn'">Book Now</button>

in a test.html file it tries to open bookview.php

Are you missing something...
Forum: PHP Sep 16th, 2009
Replies: 7
Views: 279
Posted By pritaeas
what is the error ?
Forum: PHP Sep 15th, 2009
Replies: 5
Views: 1,041
Posted By pritaeas
http://code.google.com/apis/ajaxsearch/documentation/reference.html#_class_GSearch

See the "Searchers" section. Appears to be limited to 4 or 8.
Forum: PHP Sep 15th, 2009
Replies: 5
Views: 1,041
Posted By pritaeas
According to the section "PHP Access" in http://code.google.com/apis/ajaxsearch/documentation/#The_Basics it should be possible.

My guess is you already tried this. At work we use the paid...
Showing results 1 to 40 of 112

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC