Jump to content

hazel

Members
  • Posts

    12
  • Joined

  • Last visited

hazel's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. hazel

    form

    HiCan get and post form method works together? example: if (isset($_POST[]) && isset($_GET[]))??how can i make two submit buttons work in a single form? each of them using get and post method.
  2. Thanks all, i managed to solve my problem!!
  3. Hi darkelfyour solution sound logic to me. but how do i extract the titles and subtitles out from a table from a table? well, heres another example, i have productID, versionID and software column in a table. Under productID theres different versionID and under A versionID there would be different software. What i want to do now is to extract those versionID and software that belongs to 1 productID. And list the software under its own versionID. hm, some example code would be better
  4. Hi everyone,I have a question again.... now i want to display the sub data under a header title, hmm i dont really know how to explain that in words. the example should show it clearly:Title: sub title1 sub title2 sub title3 sub title4 ...Title1: sub title1 sub title2 ...Title2: ...and so on... All the title are under main item. How do i extract the datas all from 1 table?? and arrange them like above as shown.
  5. hazel

    ?? global variable ??

    Thanks little goatdo you include a GET method form as well in the <a href="yourpage.php?variable=value">hi</a>?And the $_GET['variable'] can be written at another page?
  6. HiAnybody knows how to display datas in a page depending on the selection made on the previous page??? Selection on the previous page using <a href </a> for user to select. I do not know how to capture the value that user had selected and make it useable on the page that need it to display the datas.hope i made myself clear.
  7. hazel

    Help~~

    Hi i tried alot of times, but i got a warning of "Cannot modify header information - headers already sent by ..... " I used ob_start(); and ob_end_start(); which i got it from net. But stil not workable, it still add unwanted item into dataabase. Can someone pls help mi.....
  8. hazel

    Help~~

    HiI had tried inserting the header, it works because now i press on refresh it does not add extra entry, but now i cannot add any item into it. sorry me for asking a stupid question, hm what does the $page_mode represent? i used:if ($_GET['submit'] == $_GET['ADD']){//add user info ($result) header ("Location: softwareversion.php"); exit(); if (!$result){ die(mysql_error()); }}where the words in red i got it from the form<input name="submit" type="submit" id="submit" value="ADD">Am i doing the right thing??
  9. hazel

    Help~~

    Hi aleksanterii use localhost by setting up the mysql in my own machine. not with the remote server i think. i just started learning php for about a mth ago only. And i am a complete noob in this. So really thank you for helping me. These are the codes which i use in the page. <?php $version = $_GET['add_SWversion'];$revision = $_GET['add_revision']; echo("<p><strong>Here are all the data : </strong></p>"); $result = @mysql_query ("SELECT ID, software_version, revi FROM software_version "); if(!$result){ echo ("<p>Error performing query :" . mysql_error() . "</p>"); exit(); } //Display text and 'delete' link beside eachwhile($row = mysql_fetch_array($result)){ $SVID = $row["ID"]; $software_version = $row["software_version"]; $revi = $row["revi"];echo("<p> $software_version (revision : $revi) " . "<a href = '$PHP_SELF? delete = $SVID'>" . "Delete this version</a> " . " <a href ='SW_modify.php?modify = $SVID'> " . " Modify</a></p>"); } if ($_GET['add'] == $_SESSION['add']){ $sql = "INSERT INTO software_version (version_id, software_version, revi) values ('$colname_Softversion', '$version', '$revision')"; mysql_query($sql) or die(mysql_error()); }elseif (isset($_GET['$delete'])) { $sql = "DELETE FROM software_version WHERE ID = $delete";mysql_query($sql) or die(mysql_error()); }?>Now using the codes above i cannot add item. Do you have any suggestion? In the meantime i will try out your example.
  10. hazel

    Help~~

    sorry, and this is using a localhost. only can be seen on my own machine.
  11. hazel

    Help~~

    Hi Aleksenteri,I did not make link to another page, instead i want it to reload the same page when i add any items, and upon adding the items i would see the updated page immediately. I cant do it, only if i press on refresh then the page would be updated. I saw from website, to use $_SESSION[] = uniqid() then this would create a random char. then after all these process and the same to be use at the bottom of script. Hazel
  12. hazel

    Help~~

    Hi all,I am having a problem with my webpage with database. Whenever i click on refresh button from browser, it will add the recent item into my database which i do not want it to happen. Why is that so???? i search many forum and got an answer to use session. But can somebody tell mi how to go about using the seesion ?? A million thanks in advance!!! Hazel
×
×
  • Create New...