nav33n 472 Purple hazed! Team Colleague Featured Poster

I was reacting to this:

"That is why i respect a blonde cute female c++ developer too much.
She could have taken advantage of her beauty instead of coding all her life..
She just likes to produce something with her brain, she likes contemplating and observing."

Ah, It seems like you {haven't met/have no idea about} Daniweb's hardcore stalker with a never die attitude yet ? ;)

nav33n 472 Purple hazed! Team Colleague Featured Poster

Annoys me. Ive learnt through working with such people on projects that a significant percentage dont work well in teams, because thier education system places a very high demand on being *the* number one through your own hard work.

You must have worked with the wrong 'set' of people for that bad experience. This has never happened to me (I have been working for past 3 yrs).
Isn't the sentence in bold a good thing ? Who doesn't want to be number one ? :)

Gets a bit annoying when the one bloke ends up rewriting all your code on his own...

Now, that sucks. Unfortunately, there are people with 'extraordinary ego' everywhere. They just want their {script/idea} to be implemented. Its horrible, I know. :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

What is the big deal about these badges anyway ? It isn't a real badge that you can show off to the kids playing monopoly and say, "Take a good look at my featured poster badge. I am a famous personality. k. bai!!! :twisted: " .

:icon_rolleyes:

Stop whining Serkan. Every programmer/poster has his day. Patience is the key. Right ?

jephthah commented: w3rd +12
nav33n 472 Purple hazed! Team Colleague Featured Poster

... I am promoting my website...

All I can say is, OMG Retard.

nav33n 472 Purple hazed! Team Colleague Featured Poster

how can i access my admin page with edit and delete buttons in (employers/jobseekers form)

Probably by clicking the correct link. :icon_rolleyes:

nav33n 472 Purple hazed! Team Colleague Featured Poster

mysql_query() sends a unique query (multiple queries are not supported) to the currently active database on the server that's associated with the specified link_identifier .

Source: http://in2.php.net/function.mysql-query

veledrom commented: Thanks +2
nav33n 472 Purple hazed! Team Colleague Featured Poster

Hmm! so, as per my understanding, you click a link (where you pass the id through the url, query the table with that id, fetch the relative records and then you either update it or delete it ?
Right ?
1. Why do you have a form within a form ? One form is enough to do both the jobs. Have 2 submit buttons with different names in one form and do respective operations when 'that' particular button is clicked.
Here is an example.

<?php
if(isset($_POST['submit1'])) {
	print "Update button pressed.<br>";
	print_r($_POST);
} 
if(isset($_POST['submit2'])) {
	print "Delete button pressed.<br>";
	print_r($_POST);
}
?>
<html>
<body>
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<input type='text' name='name'>
<input type='hidden' name='id' value='3'>
<input type="submit" name="submit1" value="Update">
<input type="submit" name="submit2" value="Delete">
</form>
</body>
</html>

I hope its clear.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Yep! Try with w3school's ajax examples. Have an onchange event in first selectbox, which when changed calls an ajax function to query the table (by passing the selected value of the first selectbox) and return respective records.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Have an onchange event for the first select box and submit the page. Then use this selected value and query the table and display relevant options in second selectbox.

nav33n 472 Purple hazed! Team Colleague Featured Poster

You should escape ' before adding it to the database.
Use,

$link = mysql_real_escape_string($_POST['link']);
	$sql="INSERT INTO catalog (link)
	VALUES ('$link')";

You got that error because, the opening ' in your query is terminated when it encounters

<a target='

nav33n 472 Purple hazed! Team Colleague Featured Poster

Nothing wrong with the query and it shouldn't go in an infinite loop. Can you post your script ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

Read this FAQ.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Obviously you will get Invalid entry ID. While the page is loading, it will check if $_POST is set. If its not set, it exits.
Instead, have it in this block.

if(isset($_POST['submit'])) {
if (!isset($_POST["id"]) || ....... other conditions..... ) {
die message...
}
}
nav33n 472 Purple hazed! Team Colleague Featured Poster

Form method is POST. You are using $_GET. :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

mysql_num_rows will tell you how many records were returned by the query.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Which query are you exactly using ? Because, earlier you had posted

//wrong query, quotes are all mixed up
$query = 'SELECT * FROM t_master_reg dt_reg_reminder >= '$today' AND dt_reg_end >='$today' ';

Now,

$query="select * from t_regulation where dt_reminder >= '$today' and dt_ended ='$today'"

The above query will only work if there is an entry in the table where dt_reminder >= '2009-05-22' and dt_ended='2009-05-22'.
Do you have a record ?
If you execute the query in phpmyadmin and if it doesn't return any record, then obviously there are no records (or) you are passing the wrong query.
Echo the query and show us what it prints (not the query with variables in it).

nav33n 472 Purple hazed! Team Colleague Featured Poster

sorry.. that was by mistake...

the code of connect.php is:

<?php
$link = mysql_connect('localhost', 'root', '');
if (!$link) {
    die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';

mysql_select_db("annadb");

//mysql_close($link);
?>

i run again the file index.php and the result was:
Connected successfully

whay it doesn't show me the word that i insert?

Okay! Now I am totally lost. Where are you inserting the values ? Check this link. I hope that link will answer your question.

And pleaseee(eee). Wrap your code in [code=php] code here [/code] tags.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Why oh why did I even bother writing the FAQ that answers this very issue if no one is going to read it? It never stops baffling me when I see these posts.

;) Newbies prefer to skip the first post I believe ! Sigh.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Yeah. You don't have mysql_select_db("Databasename"); in your script.

nav33n 472 Purple hazed! Team Colleague Featured Poster

I have attached a screen shot of the error message. I don't think its a browser issue as I get the same error message even in Chrome. Hmm!

nav33n 472 Purple hazed! Team Colleague Featured Poster

Did you print the query and execute it in mysql console or phpmyadmin ? Does that return any records ?
If Yes, then it should work in this case too.
If No, then you don't have any records in the table.

Echo the query and post it here.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Print and execute the query in phpmyadmin / mysql console. Check the error message.
OR
Use

$rsSelectOnomata=mysql_query("SELECT * FROM titloslimmatos WHERE LimmatikosTypos='$getLima'") or die(mysql_error());

This will print the error message on failure. This is good for testing purpose (and not in the production environment as it exposes your table structure and all that!)

nav33n 472 Purple hazed! Team Colleague Featured Poster

Too many errors.
1.

$sql = "SELECT * FROM {$table}"
or die("Query to show fields from table failed");

Thats wrong.

$sql = "SELECT * FROM $table";
$result = mysql_query($sql) or die (mysql_error());

is the right way.
2. You have a typo on line 12. It should be $result.
Btw, You don't have to use { } for your variables.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Upload Errors
myimage.jpg:
The Dimension limits for this filetype are 1280 x 1024. We were unable to resize your file so you will need to do so manually and upload it again. Your file is currently 3200 x 1200.

It seems like you have fixed it already ? :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

:S Sometimes it work and sometimes it doesn't. Strange!

P.S. It's working fine ATM.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Sorry, my test account :) Was trying to see if the problem only affects regular members.

We had already mentioned this problem here .

nav33n 472 Purple hazed! Team Colleague Featured Poster

try this

function dwos($title,$body,$rpcurl,$username,$password,$categories)
{
$categories=array();
$categories = implode(",", $categories);
}

That will not work. You are initializing an array called categories, then imploding the values in the categories (which will be null, ofcourse) and assign it to a normal variable $categories! :S What will that do ?

@ OP, What are you trying to achieve ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

Do you want only mysql or do you also want a webserver (apache) and php with it ? If you want all these, then you can download WAMP. You just have to install the application. It will set up mysql and web server for you !
If you want only mysql, then you can download it here . As far as I know, It will not restart the system unnecessarily .

nav33n 472 Purple hazed! Team Colleague Featured Poster

My 2 cents, you can pass an array as the 1st and 2nd argument of str_replace function.

<?php
$search_array = array("”","“");
$replace_string = "_";
//query 
//while loop
$introtext = str_replace($search_array,$replace_string,$mainmenurow['bodytext']); 
//....
?>

This is not different from your piece of code. But, both of these should work!

nav33n 472 Purple hazed! Team Colleague Featured Poster

Works fine for me. Probably, you didn't wait till the page was loaded.

nav33n 472 Purple hazed! Team Colleague Featured Poster

eh, lighten up. i make fun of every religion. christianity and scientology and mormons are my favorites to mock.

Whatever it may be. But it shouldn't hurt others sentiments. Ain't it ? And, I don't see anything superstitious. But anyway, that's your perception. :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

aren't you the buddhist monk who gets all teary-eyed when someone talks about eating steak?

Is it mandatory to make fun of his religion, because as far as I know, He isn't a monk (and Buddhist monks are the most peace loving people I know).

nav33n 472 Purple hazed! Team Colleague Featured Poster

Is there any way to get some information about posting ranks?

Earlier, Daniweb had a memberlist, which you could sort on post count and get all the information about the ranks. But it isn't available anymore as Dani wants to keep this a surprise!!!!! :P

nav33n 472 Purple hazed! Team Colleague Featured Poster

Which server side language are you using ?
If you are using php, you can create a string like 10|11|12 and insert. While fetching these values from the table, use explode to split the values into different variables. :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

<offtopic> You should also consider using mysql_real_escape_string to prevent any kinda sql injections. </offtopic> :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

Use rand function if you want random numbers. If you want all the numbers between the 2 numbers specified, use a loop.

nav33n 472 Purple hazed! Team Colleague Featured Poster

You are welcome! Cheers! :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

Hi All,
Hope all are fine. I need some help, that is i want to show email address after provides the username and password. it will happen in my personal site.

:) You should have started a new thread and mentioned your problem in detail (providing relative code). But anyway, since you are a newbie, thats okay.
You can start off by connecting to mysql, http://www.w3schools.com/PHP/php_mysql_connect.asp . Then, querying the table to get the desired output. http://www.w3schools.com/PHP/php_mysql_select.asp
Go through w3schools website tutorial. Post relevant code in case you can't solve it.
Cheers!

nav33n 472 Purple hazed! Team Colleague Featured Poster

Check if you have specified the correct username, password, database name and host address in dbconnect.php . (Maybe it still has local settings).

nav33n 472 Purple hazed! Team Colleague Featured Poster

You are not selecting any database :) mysql_select_db("Databasename");

nav33n 472 Purple hazed! Team Colleague Featured Poster
test..
//test2

Works fine ATM.

nav33n 472 Purple hazed! Team Colleague Featured Poster

:D personal bodyguard ? eh ? LOL.. Funny!

c'mon guys don't crowd up on someone, Narue is quite capable of handling such things, let her and Serkan sort it out.

Who said Narue isn't capable of handling such things ?
It was my personal opinion and I said what I felt like saying. :twisted:

nav33n 472 Purple hazed! Team Colleague Featured Poster

:-/ Hmm! Okay !

nav33n 472 Purple hazed! Team Colleague Featured Poster

Then, I think you should keep this to yourself. Announcing your inner feelings to the world wide web isn't a very good idea. Honestly speaking, this thread makes you look like a stupid. No offense, but that is the truth.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Wtf is wrong with you man ?? :-O Why don't you find someone at your office, get married, take a break and then come back ?
This isn't love. Its just infatuation and you are too old for that.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Post your code.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Hmm.. Did you try with move_uploaded_file ? Also, try copying a file to the same location and see if it works :-/

nav33n 472 Purple hazed! Team Colleague Featured Poster

:-/ Nothing wrong. Print $_FILES['ufile']['error'] . Check if tmp and /home/content/a/b/a/abazoskib/html/snapit/photos/ has the privileges.

nav33n 472 Purple hazed! Team Colleague Featured Poster

I totally misunderstood your question. I thought you wanted to display selected dropdown list value after submitting the page. But anyway, try this one.

<body>
<?php
	include 'cms/core/config.php';
	include 'cms/core/opendb.php';

$query = "SELECT id, description, keywords, author, language, rating, classification, distribution, robots, revisit, copyright, email, updated FROM meta WHERE id = '7'";
$result = mysql_query($query) or die('Error : ' . mysql_error());
list($id, $description, $keywords, $author, $language, $rating, $classification, $distribution, $robots, $revisit, $copyright, $email, $updated) = mysql_fetch_array($result, MYSQL_NUM);

?>
<form method="post" action="default.php?s=editmeta">
<input type="hidden" name="id" value="5">
  <table width="700" border="0" cellpadding="5" cellspacing="0" class="box">
<tr> 
      <td width="100" valign="top">Description:</td>
      <td><input name="description" type="text" id="description" value="<?=$description;?>" size="100"></td>
    </tr>
    <tr> 
      <td width="100" valign="top">Keywords:</td>
      <td><input name="keywords" type="text" id="keywords" value="<?=$keywords;?>" size="100"></td>
    </tr>
    <tr> 
      <td width="100" valign="top">Author:</td>
      <td><input name="author" type="text" id="author" value="<?=$author;?>" size="100"></td>
    </tr>
    <tr> 
      <td width="100" valign="top">Language:</td>
      <td>
	<select name='language' id="language" >
<option value="en" <?php if($language=="en") { echo "selected"; }?>>English</option>
<option value="ko" <?php if($language=="ko") { echo "selected"; }?>>Korean</option>
<option value="it" <?php if($language=="it") { echo "selected"; }?>>Italian</option>
    </select>    
    </td>
    </tr>
    <tr> 
      <td width="100" valign="top">Rating:</td>
      <td>
	<select name="rating" id="rating">
	<option value="general">general</option>
	<option value="mature">mature</option>
	<option value="restricted">restricted</option>
	</select>
      </td>
    </tr>
    <tr> 
      <td width="100" valign="top">Classification:</td>
      <td><input name="classification" type="text" id="classification" value="<?=$classification;?>" size="100"></td>
    </tr>
    <tr> 
      <td width="100" valign="top">Distribution:</td>
      <td>
    <select name="distribution" id="distribution">
    <option value="global">global</option>
    <option value="local">local</option>
    <option value="iu">internal use</option>
    </select>
      </td>
    </tr>
    <tr> 
      <td width="100" valign="top">Robots:</td>
      <td>
    <select name="robots" id="robots">
    <option value="index, follow">index, follow</option>
    <option value="noindex, nofollow">noindex, nofollow</option>
    </select>
      </td>
    </tr>
    <tr> 
      <td width="100" valign="top">Revisit After:</td>
      <td>
    <select name="revisit" id="revisit">
    <option value="7 days">7 days</option>
    <option value="14 days">14 days</option>
    <option value="30 days">30 days</option>
    <option value="60 days">60 days</option> …
nav33n 472 Purple hazed! Team Colleague Featured Poster

Its not $_REQUEST , but, $_REQUEST.