Jump to content

BluePhoenixNC

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

BluePhoenixNC's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. My appologies, I have no clue with VB and I am asking for a friend of mine: The question is: is there a function like the one in php: [code]$_SESSION[form] = array_merge($_SESSION[form], $_POST);[/code] and how would I be able to read those posted variables out ? Any help is greatly appreciated, maybe someone knows about a good VB Forum, where I could send him, as far as I am concerend this forum is the best as far as turnaround time is concerned and I have never gotten a useless response here, that's why I am asking in this forum first. Thanks again.... 
  2. My appologies, I am not a JS junkie and just starting out with the whole thing so please be patient with me. I was wondering if it is possible to create an iframe in Javascript dynamically. have it load a certain page based on a variable and, assign the iframe a CSS class (which is to determine the height and width of that frame as opposed to have to go through the js code and change those attributes) and place the whole thing into a specified div container. here is what I had so far: [code]function createFrame(url) {   var placeDIV = document.getElementById("placeme");   var xIFrameElement = document.createElement("iframe");   xIFrameElement.frameBorder = 0;   xIFrameElement.name = "someFrame";   xIFrameElement.id = "someFrame";   xIFrameElement.class = "frameclass"; //not sure about that one if this is valid   xIFrameElement.location = url; //not sure either   placeDiv.appendChild = (xIFrameElement); } [/code] But it just does not 'activate' and I am not sure how to proceed. Any help is greatly appreciated. Thanks
  3. [!--quoteo(post=386961:date=Jun 22 2006, 04:22 PM:name=Crayon Violent)--][div class=\'quotetop\']QUOTE(Crayon Violent @ Jun 22 2006, 04:22 PM) [snapback]386961[/snapback][/div][div class=\'quotemain\'][!--quotec--] [/quote] Crayon: Thank you very much :) That was exactly what I was looking for..... now I have to do some readup on php.net to fully understand your code example..... :) but it works out the box..... :) Thanks again...
  4. [!--quoteo(post=386929:date=Jun 22 2006, 02:55 PM:name=SemiApocalyptic)--][div class=\'quotetop\']QUOTE(SemiApocalyptic @ Jun 22 2006, 02:55 PM) [snapback]386929[/snapback][/div][div class=\'quotemain\'][!--quotec--] Thats what Crayons code does... Searches all of the VIN_ID's in the database and returns all of the VIN_IDs [/quote] Semi: Thank you, too. I think I confused you guys more than necessary> I appologize, English is not my native language and php/mysql well... let's just say... n00b hits it.. ;) let me try that again and hopefully I make more sense now: $mystring ='MHASCH21051035272'; // the only known value and "static" user typed that in $findme = $something out of the table; // loop through table to get those values $pos = strpos($mystring, $findme); so what I want to know is: "is in the variable $mystring any of the "strings" contained in the tablecolumn VIN_ID ? Column Vin_ID has just that part of the vin which indicates the Model, therefore I need to find a match and it needs to loop through the table to return a result. I should get a match at position (ID) 13 since SCH21 can be found in $mystring all others do not match.... Does that make more sense ? Again my apologies for making things more complicated than they need to be.
  5. [!--quoteo(post=386921:date=Jun 22 2006, 02:13 PM:name=Crayon Violent)--][div class=\'quotetop\']QUOTE(Crayon Violent @ Jun 22 2006, 02:13 PM) [snapback]386921[/snapback][/div][div class=\'quotemain\'][!--quotec--] have sql do it for you. [code] $findme  = 'SCH21'; $sql = "select * from table where VIN_ID like '%$findme%'"; $result = mysql_query($sql); [/code] [/quote] Crayon: thank you for your reply, that is what I eventually want to do, but first I want to "validate" the VIN. In other words, I want to see if the string in VIN_ID can be found in the VIN. For that I need to check the entire column VIN_ID against the VIN and see if any of those can be found in the VIN, if this makes any sense.
  6. Sorry, but I did not know how to make the header say what I need. I am trying to do a lookup of a value. The situation is the following: I have the VIN (something like MHASCH21051035272) and I have a table setup like that: ID VIN_ID Model Category 1 LYD1C model1 1 2 YCBL1 model2 1 3 KCAL3 model3 1 4 LZH1A model4 1 5 YAEL1 model5 1 6 YCFL1 model6 1 7 JCHL1 model7 1 8 JCJL1 model8 1 9 JCKL1 model9 1 10 JCML0 model10 1 11 SCBL1 model11 2 12 SCHZ1 model12 2 13 SCH21 model13 2 ... Now what I want to do is see if a value of VIN_ID is contained within the VIN and then give me the table row. I assume I have to do something like: [code]$mystring ='MHASCH21051035272'; $findme  = 'SCH21'; // loop through table to get those values $pos = strpos($mystring, $findme);[/code] Any help in this matter is greatly appreciated and I appologize for the lengthy post, but I would not know how to explain it better than by examples. Thank you
  7. [!--quoteo(post=376451:date=May 23 2006, 03:35 PM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ May 23 2006, 03:35 PM) [snapback]376451[/snapback][/div][div class=\'quotemain\'][!--quotec--] You could do something even more simple: [code]if(substr($url,0,7) == 'http://') $url = substr($url, 7));[/code] I always screw up the math on that second part, so you might want to test it. [/quote] That was exactly what I was looking for..... Thank you very much and the math works, too.... ;) put the {} around the $url= and voila.... Awesome..... Again thank you, Ober
  8. Ok, here is my problem and I am not very much familiar with either "ereg_replace or preg-match". What I am trying to do: I have a form where the visitor can enter a URL to their Website. Since I do not know what they will type in (http://domain.com/index.~) I want to get rid of the (http://) so I can save it to the DB as "domain.com/~whatever" or if the user typed in www.domain.com I would like to save that..all without the (http://) - so I have everything uniform in the table and can then use it later if needed as a working url by simply adding the http:// prefix. Does that make any sense ? (And no, I am not running into people putting https:// or ftp:// into the field) Maybe I should also mention that I use php 4.3.9 As always thank you in advance for all your help, if this question had already been asked (an I am to stupid to find it, my apologies, please point me then to the link.... I am searching now for days for a solution)
  9. Darkness Soul: yes you are correct, I need it for each state starting at one and counting up. The reason why I hardcode BRG and the state into the ID is: that this is a designator for an offline program which is still being used, and to make bot records easier to read and compare. I need in my table some way to verify the uniqueness of each record. But as far as the Counter goes, I came up with this Idea (if everything works correctly) before saving the record, count the records for the state in question, take that number and add one to it. How reliable that is, I am not sure, that's why I am here. I believe that would bypass the need for me to actually store that "increment" number in a seperate table. The whole reason, why I came up with putting BRG into the "autoincrement" field was, that I need an incrementing Number for each state, so I figured I do it from the beginning and don't parse it into it upon display, I think that's what you sugessted, Fen..right ?
  10. After getting so much help here, I am again trustfully posting a question here, please keep in mind I am not a php / mysql pro by no means, so be patient with me. Here is the scenario: In MySql I would like to create a column called D_ID, which is supposed to be a concated value with a prefix of 'BRG" then the State and then an autoincrement value. Alltogether it should read: 'BRGVA001' and then just add a number to VA, if a second entry has been made. With another state it would start with 001 again. This column is supposed to be unique and no duplicates allowed (naturally). Since I have the state within the db it's easy to concate that for me, but how would I make PHP count all entries starting with a particular state, like VA, find the highest Number and add one to it ? Sounds in theory very simple but I have no clue as to how to realize that. Thank you
  11. [!--quoteo(post=358127:date=Mar 24 2006, 10:31 PM:name=AV1611)--][div class=\'quotetop\']QUOTE(AV1611 @ Mar 24 2006, 10:31 PM) [snapback]358127[/snapback][/div][div class=\'quotemain\'][!--quotec--] I post multiple data queries to different iframes based on a single input form on a site... it works great for me. You should have no problem with what you are trying to do. You could perhaps take the form, then ask them from a listbox what to do with the data [/quote] hmmm it's late and after almost a week of trial and error, I might be a bit slow in understanding. Say I have a form structred like that: [code]<form> <table ..> <tr><td> <input class="frm" type="text" name="d_ccity" size="30" /></td></tr><tr> <td><input class="frm" type="text" name="d_State" size="30" /></td> ... <td> <iframe> <form action="<?=$thisform;?>"> <table> <tr><td><input class="frm" type="text" name="x" size="30" /></td></tr> <tr><td><input class="frm" type="text" name="y" size="30" /></td></tr> <tr><td><input class="frm" type="text"  readonly name="z" size="30"  value="<?=echo phpfunction(x+y);?>" /></td></tr> <tr><td>[calculate]</td></tr> </table> </form></iframe> <tr><td>[Submit]</td></tr> </table></form>[/code] <-- very simplified code That upon hitting the submit button, not only the city and state variables but also the x,y,z variables will be saved into a session ? and therefore usable for future procedures ? If that would be that easy, that would be awesome, but for some reason I am not sure that this works. I might have a logical Jetlag. Any guidance is greatly appreciated. Thanks for the quick response.
  12. First things first... english is not my native language, so I apologize if my explantaions are long winded or problematic to understand. Here is my problem: I have a form in which next to some simple data (Name address etc) some calculated values need to be produced and be able to be stored in a DB. I.E a mortgage Calculator comes to mind (same principle). Here is what I have so far: Form with input (name and address and some values to do calculations with. I was thinking about sessions by parsing the information to another form PLUS the calculated values, but there are more than one calculation to be performed and it should be "flexible" to allow several scenarios. So now I am stuck. take Excel for example I can put in field 1 and field 2 a value, have that calculate in field 3 but the header is untouched (Name address etc.) By searching the board I heard of AJAX, but I have no clue how to implement that. I was also thinking about IFRAMES but can I do calculations in there independently from the main form, so I can then pass ALL variables to another Form and then save to DB ?! I am stumped and don't really know how to proceed with this.... Thanks for the help, in advance
×
×
  • 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.