
nilansanjaya
Members-
Posts
40 -
Joined
-
Last visited
Never
Everything posted by nilansanjaya
-
try using, <?php header("Location: path_to_fail_page.php"); ?>
-
Option Selected from PHP generated dropdown
nilansanjaya replied to EVENT_HORIZON's topic in PHP Coding Help
if you want to do it with pure php ( and little bit of javascript. not ajax ) just submit the form to the same page , on the onchange method of the select, using javascript, then capture the values on the top and do what you want to do <select name="select_name" onChange="document.form_name.submit();"> -
so what help you exactly need ? a way to do it ? ideas ? codes?
-
display Column details from mysql using php
nilansanjaya replied to vboopathicse's topic in PHP Coding Help
query the database and get the details. then, while( $row = mysql_fetch_array($results) ){ echo 'id: '.$row['id'].'<br />'; echo 'id: '.$row['tamil'].'<br />'; echo 'id: '.$row['english'].'<br />'; echo 'id: '.$row['maths'].'<br />'; } you can do the html formatting part as you want. its just a example -
are you getting a php error or a mysql error ?
-
did you checked the mysql user's permission on that database ?
-
Having a problem with my first PHP script
nilansanjaya replied to Freedom-n-Democrazy's topic in PHP Coding Help
NO problem -
Having a problem with my first PHP script
nilansanjaya replied to Freedom-n-Democrazy's topic in PHP Coding Help
link isn't empty. its the database link mysql_connect('localhost', 'testusr', 'testpw'); better to use a different variable for sql , ex: $query -
Having a problem with my first PHP script
nilansanjaya replied to Freedom-n-Democrazy's topic in PHP Coding Help
this , mysql_query ($link); should be mysql_query ($query); and use $query = "sql query here"; between the if statement , like i mentioned before -
Having a problem with my first PHP script
nilansanjaya replied to Freedom-n-Democrazy's topic in PHP Coding Help
try this <?php $link = mysql_connect('localhost', 'testusr', 'testpw'); mysql_select_db('testdb', $link); $email = $_POST['e-mail']; $query = ""; if ($_POST['action'] == 'Register') { if ($_POST['newsletter'] == 'Mens') { $query = "INSERT INTO newsletters(mens) VALUES('$email')"; } elseif ($_POST['newsletter'] == 'Mens & Womens') { $query = "INSERT INTO newsletters(mensandwomens) VALUES('$email')"; } elseif ($_POST['newsletter'] == 'Womens') { $query = "INSERT INTO newsletters(womens) VALUES('$email')"; } ;} mysql_query ($link, $query); mysql_close($link); ?> -
Having a problem with my first PHP script
nilansanjaya replied to Freedom-n-Democrazy's topic in PHP Coding Help
you cant just use "$query =" and put a if statement in the middle like that -
can u explain whats goin on ? and why friendly url's not working ? i guess its easily done using friendly url's ( mod_rewrite ) and bit of logic
-
Very simple Form using PHP not working, please help.
nilansanjaya replied to jhodara's topic in PHP Coding Help
it should be <?php if ( $firstname == "Joe" && $lastname == "Shmo" ) { echo( "Welcome, Myself!" ); } else { echo( "Welcome, $_POST[firstname] $_POST[lastname]!" ); } ?> -
im not sure that a folder can be renamed inside a zip file. so i suggest you could extract it , make the change's and compress it back to a zip , unless some other person give's you a better solution
-
tried this way ? rename("folder1/old","folder1/new");
-
hey thanks well...dat was cool... but i need a one which can send to gtalk , msn ( etc ) services yeah im sorry , i forgot to mention that one properly. thanks again for finding dat
-
yeah but.. in this case , i dont want 2 user's to chat. just user's and my script ( auto )
-
thanks , bt wat u mean ? i want a way to SEND AND RECEIVE IM msgs like gtalk and all.
-
hey guys , any idea how can i send and recive IM's through a php script ? not a chat. but a automatic script.where i could reply according to the IM other person sends ya something like a chat bot.... but for some other work please help !
-
<?php //my sql connection goes here. $sql = "select * from yourtablename"; $results = mysql_query($sql); echo "<table><tr><th>title</th><th>id2</th></tr>"; while($row = mysql_fetch_array($results)){ <tr><td>$row['title']</td><td>$row['id2']</td></tr>; } echo "</table>"; ?>
-
u gonna pay me ? lolz
-
If you're dealing with dates from before the year 1700 why would you need timestamp accuracy in the first place, but anyway its impossible since the valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT. (These are the dates that correspond to the minimum and maximum values for a 32-bit signed integer.) The problem with Windows is that it doesn't support negative timestamps. So the question remains, why do you need timestamps from that long ago, you wouldn't have had records to the second anyway. I'm sure that back then records to the day if not even month could have been inaccurate....
-
to b honest , i ddn read all your code but anywy ive attached a pagination class. use it ! [attachment deleted by admin]