Jump to content

AE117

Members
  • Posts

    83
  • Joined

  • Last visited

    Never

Everything posted by AE117

  1. O God I feel like such and Idiot Thank You much that solved it, i need to get off this computer sometime lol.
  2. Question for you the other guy before me change your $first = @$_POST['first_name']; $last = @$_POST['last_name']; to $first = $_POST['first_name']; $last = $_POST['last_name']; did you keep that change and you might want to try a $_REQUEST instead of post or and just saw this function yourfunction () { if(!empty($first) && ($last)) Should be function yourfunction () { if(empty($first) && ($last))
  3. He solved it
  4. Put your random generator in to a function call it what ever you like and the you need to change your sumbit button to call that function Soo <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> Turns into <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" onsubmit="return yourfunction();"> function yourfunction () { if(!empty($first) && ($last)) { echo $first . " " . $last . " " . $charecter[rand(0,4)] . " and " . $doing[rand(0,3)] . "<br /> Lucky Number: " . $test . "."; } if($test < 99 && $test > 50) { echo "That is a great number!"; } }
  5. dont use the () around the name that will go for require once as well so include 'db_login.php';
  6. Just to let those who want to know what I did to solve this is i changed the foreach into a for Then it was able to stop now i Have a new problem which is under another topic to Ill post this as solved
  7. Heres the Code header("Content-Type: text/xml"); $table_id = 'ost_media'; $query = "SELECT * FROM $table_id"; $dbresult = mysql_query($query, $dbconnect); $outer_table = 'ost_media'; $queryB = "SELECT * FROM ost_media WHERE media_title='1997 Eagle Talon'"; $resouter = mysql_query($queryB, $dbconnect); $inner_table = 'ost_media'; $query = "SELECT * FROM $inner_table WHERE media_access='private'"; $resinner = mysql_query($query, $dbconnect); $dom = new DomDocument('1.0','utf-8'); $root = $dom->createElement('featureset'); $root = $dom->appendChild($root); $row = @mysql_fetch_assoc($resouter); // process all rows of the inner/many/child table while ($row = @mysql_fetch_assoc($resinner)) { // add node for each record $outer = $dom->createElement('album'); $outer = $root->appendChild($outer); $outer->setAttribute('name', 'Shock Value'); $outer->setAttribute('author', 'Timbaland'); $outer->setAttribute('imageUrl', 'images/Timbaland/image.jpg'); $outer->setAttribute('link', 'http://flabell.com/'); // add a child node for each field while ($queryB = @mysql_fetch_assoc($resouter)) { $inner = $dom->createElement('song'); $inner = $outer->appendChild($inner); $inner->setAttribute('name', 'name'); $inner->setAttribute('duration', '3:15'); $inner->setAttribute('buy', 'false'); $inner->setAttribute('download', 'true'); $inner->setAttribute('downloadsource', 'download/song1.mp3'); $value = $dom->createTextNode('songs/song1.mp3'); $value = $inner->appendChild($value); } // foreach } // while // get completed xml document $xml_string = $dom->saveXML(); echo $xml_string; ?> Now heres the problem, The second while with in the first while is calling to the query $resouter which must equal $queryB and as you can see i have $queryB that is set to equal a title "1997 Eagle Talon" There are actually two of these values with in the table but it only shows one of them. Then lets say I have a title called A and I have 100 of them it will show 99 of them THen lets say I have one entry to equal 18 it will show nothing. For some reason it is not showing the first value. Does anyone see anything I am doing wrong??? Thanks
  8. I would use a simple if else statement if ($value != "") { header("Location: http://yourdomain.com"); } else { $value == "") { header("Location: http://yourdomain.com"); } something like that $value would be check the db table so it would need to be a mysql query
  9. So let me get this straight, You want a person to register without haveing to put in Address, age, phone etc. But when they login to there account they need to fill in this information to continue to their homepage, correct??
  10. not sure what you mean by that one jack can you elaborate??
  11. That actualy looks like a nice package Well if you have that may I just finding some sort of free ware video player and then install it usally its a simple as pasteing in the files then adding the correct permission I learned alot from downloading and instally a community the host videos like phpdolphin. I studied how they did it. Installing something like that is not going to be a short easy process there are a lot of little things to fus with. My steps would be Find an upload script that will convert and store the information into a database and install Then find a video player in from flash that will read your database and install then put it on a page Are you trying to create a video community or something or is it so you can host your own videos?
  12. i think you can not sure but give something like this a try <?php $CFG->root = "http://127.0.0.1/"; $header = "header"; $CFG->headerDir = $CFG->root.$header; ?> that should output (using and echo statment) http://127.0.0.1/header
  13. No other suggestions???
  14. most hosting company dont have the have the feature to support ffmpeg unless you have a deticated server however there are a few out there apthost and 1 and 1 I believe. Just do a google search for ffmpeg hosting companys and you need to ask godaddy if you can use ffmpeg on a shared server unless you want to pay for a deticated in which case you need to take care of security and updates and so on. So if you dont have experience with that I would switch to a hosting company that does support ffmpeg such as apthost. Not trying to market apthost just the only one i can think of off the top of my head.
  15. Not sure what you mean by this the while statement uses the resinner query to create the levels at albumn So right now i have the query set to private which i have entry however if i set it to public where i have over 100 entry then 100 levels of album are created. My problem is that i need the songs inside the album to only show if the are equal to a certain element, Currently the songs that are showing is becuase the foreach statement is creating a song for each column that is in the table ost_media. What I am trying to get it to do is call the query outer where the query is set to media_title "1997 Eagle Talon". There are two of these values with in the column within the table hence 2 songs should show not 22. And I did change the it to outer and that doesnt work.
  16. Totally missed that one and i guess i dont becuase i didnt pull any error in dw or log. But I did change that and it didnt make a difference it is still pulling every column
  17. The inner table is actually for the album selction so if i want more then one album level I change it using that mysql call. Then the outer is to select the songs orignally i wrote it wron so i know they are switched around
  18. well the foreach is looking at $row which is a mysql that is looking for a title in a table called "1997 Eagle Talon" And i want that foreach to stop when i matchs that title, However i do think my foreach statement is off. I have tried foreach ($row = $value) $value = '1997 Eagle talon'; but i get errors left and right including a DOM exception
  19. Heres the code to start with <?php $host = ""; $user = ""; $pass = ""; $database = "; if(!$dbconnect = mysql_connect($host, $user, $pass)) { echo "Connection failed to the host 'localhost'."; exit; } // if if (!mysql_select_db($database)) { echo "Cannot connect to database"; exit; } // if header("Content-Type: text/xml"); $table_id = 'ost_media'; $query = "SELECT * FROM $table_id"; $dbresult = mysql_query($query, $dbconnect); $outer_table = 'ost_media'; $query = "SELECT * FROM ost_media WHERE media_title='1997 Eagle Talon"; $resouter = mysql_query($query, $dbconnect); $inner_table = 'ost_media'; $query = "SELECT * FROM $inner_table WHERE media_access='private'"; $resinner = mysql_query($query, $dbconnect); $dom = new DomDocument('1.0','utf-8'); $root = $dom->createElement('featureset'); $root = $dom->appendChild($root); $row = @mysql_fetch_assoc($resouter); // process all rows of the inner/many/child table while ($row = @mysql_fetch_assoc($resinner)) { // add node for each record $outer = $dom->createElement('album'); $outer = $root->appendChild($outer); $outer->setAttribute('name', 'Shock Value'); $outer->setAttribute('author', 'Timbaland'); $outer->setAttribute('imageUrl', 'images/Timbaland/image.jpg'); $outer->setAttribute('link', 'http://flabell.com/'); // add a child node for each field foreach ($row as $fieldname => $fieldvalue) { $inner = $dom->createElement('song'); $inner = $outer->appendChild($inner); $inner->setAttribute('name', 'name'); $inner->setAttribute('duration', '3:15'); $inner->setAttribute('buy', 'false'); $inner->setAttribute('download', 'true'); $inner->setAttribute('downloadsource', 'download/song1.mp3'); $value = $dom->createTextNode('songs/song1.mp3'); $value = $inner->appendChild($value); } // foreach } // while // get completed xml document $xml_string = $dom->saveXML(); echo $xml_string; ?> and here is what is outputs <featureset> − <album name="Shock Value" author="Timbaland" imageUrl="images/Timbaland/image.jpg" link="http://flabell.com/"> <song name="name" duration="3:15" buy="false" download="true" downloadsource="download/song1.mp3">songs/song1.mp3</song> <song name="name" duration="3:15" buy="false" download="true" downloadsource="download/song1.mp3">songs/song1.mp3</song> <song name="name" duration="3:15" buy="false" download="true" downloadsource="download/song1.mp3">songs/song1.mp3</song> <song name="name" duration="3:15" buy="false" download="true" downloadsource="download/song1.mp3">songs/song1.mp3</song> <song name="name" duration="3:15" buy="false" download="true" downloadsource="download/song1.mp3">songs/song1.mp3</song> <song name="name" duration="3:15" buy="false" download="true" downloadsource="download/song1.mp3">songs/song1.mp3</song> <song name="name" duration="3:15" buy="false" download="true" downloadsource="download/song1.mp3">songs/song1.mp3</song> <song name="name" duration="3:15" buy="false" download="true" downloadsource="download/song1.mp3">songs/song1.mp3</song> <song name="name" duration="3:15" buy="false" download="true" downloadsource="download/song1.mp3">songs/song1.mp3</song> <song name="name" duration="3:15" buy="false" download="true" downloadsource="download/song1.mp3">songs/song1.mp3</song> <song name="name" duration="3:15" buy="false" download="true" downloadsource="download/song1.mp3">songs/song1.mp3</song> <song name="name" duration="3:15" buy="false" download="true" downloadsource="download/song1.mp3">songs/song1.mp3</song> <song name="name" duration="3:15" buy="false" download="true" downloadsource="download/song1.mp3">songs/song1.mp3</song> <song name="name" duration="3:15" buy="false" download="true" downloadsource="download/song1.mp3">songs/song1.mp3</song> <song name="name" duration="3:15" buy="false" download="true" downloadsource="download/song1.mp3">songs/song1.mp3</song> <song name="name" duration="3:15" buy="false" download="true" downloadsource="download/song1.mp3">songs/song1.mp3</song> <song name="name" duration="3:15" buy="false" download="true" downloadsource="download/song1.mp3">songs/song1.mp3</song> <song name="name" duration="3:15" buy="false" download="true" downloadsource="download/song1.mp3">songs/song1.mp3</song> <song name="name" duration="3:15" buy="false" download="true" downloadsource="download/song1.mp3">songs/song1.mp3</song> <song name="name" duration="3:15" buy="false" download="true" downloadsource="download/song1.mp3">songs/song1.mp3</song> <song name="name" duration="3:15" buy="false" download="true" downloadsource="download/song1.mp3">songs/song1.mp3</song> <song name="name" duration="3:15" buy="false" download="true" downloadsource="download/song1.mp3">songs/song1.mp3</song> </album> </featureset> What the probelm is that is is creating a new song row for every column there is in the table, What i need it do do is only create a song row if it matches a certain element, can anyone help me out?
  20. That was useful I dont remeber exactly what i did but it works now Thank You sir
  21. Here is the view source <?xml version="1.0" encoding="utf-8"?> <featureset><album name="Shock Value" author="TimberLand" imageUrl="images/Timbaland/image.jpg" link="http://eevoke.com"><song name="title" duration="3:15" buy="false" download="true" downloadsource="download/song1.mp3">songs/song1.mp3</song></album></featureset> Looks good right thats what is really bugging me
  22. Heres my code to start with <?php $host = "localhost"; $user = ""; $pass = ""; $database = ""; if(!$dbconnect = mysql_connect($host, $user, $pass)) { echo "Connection failed to the host 'localhost'."; exit; } // if if (!mysql_select_db($database)) { echo "Cannot connect to database"; exit; } // if header("Content-Type: text/xml"); $table_id = 'ost_media'; $query = "SELECT * FROM $table_id"; $dbresult = mysql_query($query, $dbconnect); $outer_table = 'ost_media'; $query = "SELECT * FROM $outer_table WHERE media_access='300zx Twin Turbo vs ZX10R'"; $resouter = mysql_query($query, $dbconnect); $inner_table = 'ost_media'; $query = "SELECT * FROM $inner_table WHERE media_title='300zx Twin Turbo vs ZX10R'"; $resinner = mysql_query($query, $dbconnect); $dom = new DomDocument('1.0','utf-8'); $root = $dom->createElement('featureset'); $root = $dom->appendChild($root); $outer = $dom->createElement('album'); $outer = $root->appendChild($outer); $row = mysql_fetch_assoc($resouter); // process all rows of the inner/many/child table while ($row = @mysql_fetch_assoc($resinner)) { // add node for each record $inner = $dom->createElement('song'); $inner = $outer->appendChild($inner); $inner->setAttribute('name', 'title'); $inner->setAttribute('duration', '3:15'); $inner->setAttribute('buy', 'false'); $inner->setAttribute('download', 'true'); $inner->setAttribute('downloadsource', 'download/song1.mp3'); $value = $dom->createTextNode('songs/song1.mp3'); $value = $inner->appendChild($value); // add a child node for each field foreach ($row as $fieldname => $fieldvalue) { $inner = $dom->createElement($outer_table); $outer->setAttribute('name', 'Shock Value'); $outer->setAttribute('author', 'TimberLand'); $outer->setAttribute('imageUrl', 'images/Timbaland/image.jpg'); $outer->setAttribute('link', 'http://eevoke.com'); } // foreach } // while // get completed xml document $xml_string = $dom->saveXML(); echo $xml_string; ?> When I test it in firefox I get this error or statment "XML Parsing Error: junk after document element Location: http://music.eevoke.com/project/deploy/player/xml/testing.php Line Number 3, Column 1:<?xml version="1.0" encoding="utf-8"?> ^" And then when I test it i Internet explore 8 i get "The XML page cannot be displayed Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. -------------------------------------------------------------------------------- Only one top level element is allowed in an XML document. Error processing resource 'http://music.eevoke.com/project/deploy... <featureset><album name="Shock Value" author="TimberLand" imageUrl="images/Timbaland/image.jpg" link="http://eevoke... " Can anyone make somthing out of these I cant see anything myself.
  23. correct but here is the problem is i only use dot dot slash it takes me to and outside folder thats it. The file is located with in another folder outside of the php file containing folder. So not only do i need to move out of my current file location i need to move into another one
  24. Ok heres the deal I installed a PEAR package using a hosting company and it install the package under /home/php which is outside and above my public_html I have a file which is under the public_html/folder/folder/folder/file.php that has a require statement to a folder located in the folder under the home/php so my question is how do i point to a file above the public_html? Thanks
  25. seems to me like you are trying to trim a var that is the var $search= $_REQUEST['search']; $search= trim($search); try changing the second one $search= $_REQUEST['search']; $search2= trim($search);
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.