nav33n 472 Purple hazed! Team Colleague Featured Poster

Post your question in java forum to get better response :)

nav33n 472 Purple hazed! Team Colleague Featured Poster
nav33n 472 Purple hazed! Team Colleague Featured Poster

It should be echo $result['thumb_name'];

nav33n 472 Purple hazed! Team Colleague Featured Poster

Since you are including the script which creates the table, whenever you include that script, it tries to create the table causing the error.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome!

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome Nasir :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome!

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb !

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome rupaburle :) Good luck !

nav33n 472 Purple hazed! Team Colleague Featured Poster

Why do you want to create a table from php anyway ? Everytime you run your script, it will include table_create.php and tries to create the table all the time. Check this link . Add 'if not exists' in your create table query.

nav33n 472 Purple hazed! Team Colleague Featured Poster
<html>
<head>
<script type="text/javascript">
function addElement() {
  var ni = document.getElementById('myDiv');
  var numi = document.getElementById('theValue');
  var num = (document.getElementById('theValue').value -1)+ 2;
  numi.value = num;
  var newinput = document.createElement('input');
  var divIdName = 'my'+num+'input';
  newinput.setAttribute('id',divIdName);
  newinput.innerHTML = 'Element Number '+num+' has been added! <a href=\'#\' onclick=\'removeElement('+divIdName+')\'>Remove the div "'+divIdName+'"</a>';
  ni.appendChild(newinput);
}
</script>
</head>
<body>
<input type="hidden" value="0" id="theValue" />
<p><a href="javascript:;" onclick="addElement();">Add Some Elements</a></p>
<div id="myDiv"> </div>
</table>
</body>
</html>

To add another table, you need to modify the function.

nav33n 472 Purple hazed! Team Colleague Featured Poster

-914

nav33n 472 Purple hazed! Team Colleague Featured Poster

Then your query is wrong. What exactly are you trying to do with that query ?

nav33n 472 Purple hazed! Team Colleague Featured Poster
<html>
<head>
<script type="text/javascript">
function enableButton() {
	if(document.getElementById('option').checked){
		document.getElementById('edit').disabled='';
	} else {
		document.getElementById('edit').disabled='true';
	}
}
</script>
 </head>
<body onload="enableButton();">
<form method="post" action="test5.php">
<input type="checkbox" name="option"  id="option" onclick="javascript:enableButton();">Enable<br>
<input type="button" name="button" value="Edit" id="edit">
</form>
</body>
</html>

Cheers,
Naveen

nav33n 472 Purple hazed! Team Colleague Featured Poster

:) Welcome!

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb Riptorn !

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

Same error ? Try mysql_error() with die statement. Also print out your query and tell us what it says !

nav33n 472 Purple hazed! Team Colleague Featured Poster

SELECT * FROM details WHERE '$_POST[metode]' LIKE '$_POST[search]'% LIMIT 0, 50

I guess $_POST is the column name ? Print out the query, execute it in phpmyadmin/ mysql console. Check the result. Oh, also, remove the @ symbol from

$row = @mysql_fetch_array($query)

nav33n 472 Purple hazed! Team Colleague Featured Poster

Tutorial, umm..not sure.. But it can be done using ajax.. In javascript, it can be done this way.
Populate 1st dropdown from the database, have an onchange event for the dropdown. Onchange, submit the page. On submit, you can access the value of 1st dropdown, Eg. $value = $_POST['dropdown1']; Then populate the 2nd dropdown using $value as the condition. Do the same with the 3rd one.

Cheers,
Naveen

nav33n 472 Purple hazed! Team Colleague Featured Poster

August has 31 days.

nav33n 472 Purple hazed! Team Colleague Featured Poster
<html>
<body>
<form method="post" name="test">
<input type="button" name="button1" value="login" onClick="javascript: 

document.test.action='login.php';document.test.submit();"><input type="button" name="button2" value="Register" 

onClick="javascript: document.test.action='register.php';document.test.submit();">
</form>
</body>
</html>

You can do it this way.

nav33n 472 Purple hazed! Team Colleague Featured Poster

-909

nav33n 472 Purple hazed! Team Colleague Featured Poster

I dont think that can be done using php. As sDjh has already mentioned, try that in java/flash or in .NET !

nav33n 472 Purple hazed! Team Colleague Featured Poster
$query = "SELECT address_code FROM address WHERE userID= '".$myuserID."'";
$result = mysql_query($query);

<td><input type="text" name="PickupAddressPostCode" value="<?php echo $result['address_code']; ?>" /></td>

Matti Ressler
Suomedia

That should actually be

$query = "SELECT address_code FROM address WHERE userID= '".$myuserID."'";
$result = mysql_query($query);
$row = mysql_fech_array($result); //or while($row = mysql_fetch_array($result)) if your query returns more than 1 row
<td><input type="text" name="PickupAddressPostCode" value="<?php echo $row['address_code']; ?>" /></td>

Cheers,
Naveen

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb !

Does this site deals with g.i.f images and skin designs???

You need to be more specific my friend :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

@ doesn't help it error handling, but it supresses the errors.

if(@mysql_num_rows($result) > 0){ //do something

This above code, supresses the warning if there is something wrong with the query. Its not a good practice to have @, because it makes your life very difficult to know where the exact error is.

nav33n 472 Purple hazed! Team Colleague Featured Poster

-907

nav33n 472 Purple hazed! Team Colleague Featured Poster

nav33n: It's been like this for the past month. I'm running a test to see if it increases the number of people who search before they post. Additionally, DaniWeb visitors who use our search feature end up spending more than 5X longer on our site than users who don't search, so that's another reason I'm trying to put more emphasis on that section.

Cool ! :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

Hello shello ! Welcome to Daniweb ! Check this forum and post your question in a relevant forum !

nav33n 472 Purple hazed! Team Colleague Featured Poster

I always checked out SAMS publications for 'quick learning' !

nav33n 472 Purple hazed! Team Colleague Featured Poster

Nope. Just print out the query. ie., instead of

$display = mysql_query("SELECT * FROM $table ORDER BY id",$db);

do,

$query="SELECT * FROM $table ORDER BY id";
echo $query;
$display = mysql_query($query,$db);

Execute your query in phpmyadmin/mysql console and see what's the problem. Or, you can also try putting die statement after mysql_query to see the error.

$display = mysql_query($query,$db) or die(mysql_error());
nav33n 472 Purple hazed! Team Colleague Featured Poster

-903

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb!

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome herms14 ! :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb!

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

I got your PM. I couldn't reply you back cuz maybe you have disabled PM. Anyways, good luck !

nav33n 472 Purple hazed! Team Colleague Featured Poster

offtopic, But the font used in search box doesn't look too good. The font size is large. Please check the screenshot!

nav33n 472 Purple hazed! Team Colleague Featured Poster

3 $display = mysql_query("SELECT * FROM $table ORDER BY id",$db);

Select * from $table ? What does $table have ? It must be empty.

nav33n 472 Purple hazed! Team Colleague Featured Poster
<?php
session_start();
?>
<html>
<head>
<script type="text/javascript">
function login() {
	alert('<?php echo $_SESSION['un']; ?>');
}
</script>
</head>
<body bgcolor="#f1f3f3">
<form method="post" onsubmit="javascript:login();">
<?php
$g=hi;
$_SESSION["un"]=$g;
?>
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>

Try this. Btw, you didn't have session_start in your script.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Yes. You can do it without using ajax. This is how it is. You populate one select box from the table. Then have an onchange event, which submits the page when an option is selected. Then get the posted selectbox value and populate the 2nd selectbox.

nav33n 472 Purple hazed! Team Colleague Featured Poster

-900

nav33n 472 Purple hazed! Team Colleague Featured Poster

It is possible. But you can do it this way.

<script type='text/javascript'>
alert(<?php echo $_SESSION['un']; ?>);
</script>

If that doesn't work, try, alert('<?php echo $_SESSION['un']; ?>'); Cheers,
Naveen

nav33n 472 Purple hazed! Team Colleague Featured Poster

Then your code seems ok ! I dont see any problem..

nav33n 472 Purple hazed! Team Colleague Featured Poster

What IS this nasty script? I answered the same to very similar looking code just the other day :icon_eek:


Matti Ressler
Suomedia

Deja vu man ;)

nav33n 472 Purple hazed! Team Colleague Featured Poster

hello
i am using Mysql plse
send DataBase Connection and ROOt

The default user for mysql is root. Database connection can be established by using mysql_connect.
You should be specific in the questions you ask and post your question in related forum !

:)

nav33n 472 Purple hazed! Team Colleague Featured Poster

Use is_numeric instead of is_int :) !

nav33n 472 Purple hazed! Team Colleague Featured Poster

What are you doing btw ? $letter2 will have the first character of $letter. And, it works for me!

$letter2 = $letter{0};